[Libreoffice-commits] core.git: svx/source
Julien Nabet
serval2412 at yahoo.fr
Sun Feb 22 13:40:10 PST 2015
svx/source/dialog/charmap.cxx | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit c184e054d736ff1c87d2fcefb7ea9faee3d8fe9c
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun Feb 22 22:39:36 2015 +0100
Simplify erase iterator management (charmap.cxx)
Change-Id: I36b4b9895e83007d3b1f9ea4463a97c0fdd9a341
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 32178658..5da4f6e 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -1577,17 +1577,18 @@ void SubsetMap::ApplyCharMap( const FontCharMapPtr pFontCharMap )
return;
// remove subsets that are not matched in any range
- SubsetList::iterator it_next = maSubsets.begin();
- while( it_next != maSubsets.end() )
+ SubsetList::iterator it = maSubsets.begin();
+ while( it != maSubsets.end() )
{
- SubsetList::iterator it = it_next++;
const Subset& rSubset = *it;
sal_uInt32 cMin = rSubset.GetRangeMin();
sal_uInt32 cMax = rSubset.GetRangeMax();
int nCount = pFontCharMap->CountCharsInRange( cMin, cMax );
if( nCount <= 0 )
- maSubsets.erase( it );
+ it = maSubsets.erase(it);
+ else
+ ++it;
}
}
More information about the Libreoffice-commits
mailing list