diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2018-08-15 21:32:27 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-20 17:12:11 +0200 |
commit | 0787ce8814e37972a0c968f60008d4e8722b6e27 (patch) | |
tree | 9d2803ebda8813e6b3f2bc2e6f8a74953b2931c1 /svx/source | |
parent | d2c9c60fefb9687adbde4be61ed66a5123a2587f (diff) |
Simplify containers iterations, tdf#96099 follow-up
Use range-based loop or replace with std::any_of, std::find and
std::find_if where applicable.
Change-Id: I2f80788c49d56094c29b102eb96a7a7c079567c6
Reviewed-on: https://gerrit.libreoffice.org/59143
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/dialog/framelinkarray.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx index 38681286f1f0..5b24b6d75c45 100644 --- a/svx/source/dialog/framelinkarray.cxx +++ b/svx/source/dialog/framelinkarray.cxx @@ -151,9 +151,11 @@ void lclRecalcCoordVec( std::vector<long>& rCoords, const std::vector<long>& rSi { DBG_ASSERT( rCoords.size() == rSizes.size() + 1, "lclRecalcCoordVec - inconsistent vectors" ); auto aCIt = rCoords.begin(); - auto aSIt = rSizes.cbegin(), aSEnd = rSizes.cend(); - for( ; aSIt != aSEnd; ++aCIt, ++aSIt ) - *(aCIt + 1) = *aCIt + *aSIt; + for( const auto& rSize : rSizes ) + { + *(aCIt + 1) = *aCIt + rSize; + ++aCIt; + } } void lclSetMergedRange( CellVec& rCells, size_t nWidth, size_t nFirstCol, size_t nFirstRow, size_t nLastCol, size_t nLastRow ) |