Simplify a bit by using return iterator from vector erase func
Change-Id: I5d927171cb05a253ef8f5f8abd9af11b499f9fc0 Reviewed-on: https://gerrit.libreoffice.org/25786 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
@@ -837,14 +837,11 @@ void ShapeSortContext::popGroupAndSort()
|
||||
sal_Int32 nIndex = 0;
|
||||
for (ZOrderHint& rHint : maZOrderList)
|
||||
{
|
||||
while( nIndex < rHint.nShould && !maUnsortedList.empty() )
|
||||
for (vector<ZOrderHint>::iterator aIt = maUnsortedList.begin(); aIt != maUnsortedList.end() && nIndex < rHint.nShould; )
|
||||
{
|
||||
auto it = maUnsortedList.begin();
|
||||
moveShape( (*aIt).nIs, nIndex++ );
|
||||
aIt = maUnsortedList.erase(aIt);
|
||||
|
||||
ZOrderHint aGapHint(*it);
|
||||
maUnsortedList.erase(it);
|
||||
|
||||
moveShape( aGapHint.nIs, nIndex++ );
|
||||
}
|
||||
|
||||
if(rHint.nIs != nIndex )
|
||||
|
Reference in New Issue
Block a user