summaryrefslogtreecommitdiff
path: root/svx/source/table/tablerow.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-11-18 13:43:28 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-18 17:36:54 +0100
commit587ef41f75b8ea0bcd03366178d42a324dcf481c (patch)
treea672c557221d4fec8abbaf83568ed9e7242323a5 /svx/source/table/tablerow.cxx
parent8b83659bb8f3368a1df949d5bc84d7b2dd0370b4 (diff)
Simplify containers iterations in svx/source/[s-u]*
Use range-based loop or replace with STL functions Change-Id: I2ec3e58cc46c9286ef863c732912ca7a729bab62 Reviewed-on: https://gerrit.libreoffice.org/63522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/table/tablerow.cxx')
-rw-r--r--svx/source/table/tablerow.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/svx/source/table/tablerow.cxx b/svx/source/table/tablerow.cxx
index d1dd1f371800..f7ca4d8d40d0 100644
--- a/svx/source/table/tablerow.cxx
+++ b/svx/source/table/tablerow.cxx
@@ -73,9 +73,8 @@ void TableRow::dispose()
mxTableModel.clear();
if( !maCells.empty() )
{
- CellVector::iterator aIter( maCells.begin() );
- while( aIter != maCells.end() )
- (*aIter++)->dispose();
+ for( auto& rpCell : maCells )
+ rpCell->dispose();
CellVector().swap(maCells);
}
}
@@ -128,8 +127,7 @@ void TableRow::removeColumns( sal_Int32 nIndex, sal_Int32 nCount )
if( (nIndex + nCount) < static_cast< sal_Int32 >( maCells.size() ) )
{
CellVector::iterator aBegin( maCells.begin() );
- while( nIndex-- && (aBegin != maCells.end()) )
- ++aBegin;
+ std::advance(aBegin, nIndex);
if( nCount > 1 )
{