summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-12-06 22:26:30 +0100
committerJulien Nabet <serval2412@yahoo.fr>2017-12-07 04:13:54 +0100
commit49d1ab032b87634116561b970dcc580be96f33f1 (patch)
treecc1f4df6f551fb59e3592f84cccce8db47e14e50
parent1d8cb97fea57b81a1ab151b88c2180e646bd401b (diff)
Use return iterator from erase in swnewtable (sw)
Change-Id: I748ebeeef41a102feb63c304d4fae64775a3c8e2 Reviewed-on: https://gerrit.libreoffice.org/45998 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--sw/source/core/table/swnewtable.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index cc0a5fd403d0..03e84964a4ff 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -1269,9 +1269,7 @@ static void lcl_SophisticatedFillLineIndices( SwLineOffsetArray &rArr,
if( pCurr->first == aLnOfs.first )
{ // These boxes can be removed because the last insertion
// of rows will expand their row span above the needed value
- std::list< SwLineOffset >::iterator pDel = pCurr;
- ++pCurr;
- aBoxes.erase( pDel );
+ pCurr = aBoxes.erase(pCurr);
}
else
{
@@ -1286,9 +1284,7 @@ static void lcl_SophisticatedFillLineIndices( SwLineOffsetArray &rArr,
if( pCurr->second >= nCnt )
{ // if the row span is bigger than the split factor
// this box is done
- std::list< SwLineOffset >::iterator pDel = pCurr;
- ++pCurr;
- aBoxes.erase( pDel );
+ pCurr = aBoxes.erase(pCurr);
}
else
++pCurr;
@@ -2146,9 +2142,7 @@ void SwTable::CheckConsistency() const
"Wrong row span value" );
if( nRowSp == -1 )
{
- std::list< RowSpanCheck >::iterator aEraseIter = aIter;
- ++aIter;
- aRowSpanCells.erase( aEraseIter );
+ aIter = aRowSpanCells.erase(aIter);
}
else
++aIter;