diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2015-02-22 22:39:36 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2015-02-22 22:39:36 +0100 |
commit | c184e054d736ff1c87d2fcefb7ea9faee3d8fe9c (patch) | |
tree | 64553816d0b233369e587ecde26b5103b84ef2bf /svx | |
parent | 46fb44eb44979cec2f29e1e7e1f52042f96b486b (diff) |
Simplify erase iterator management (charmap.cxx)
Change-Id: I36b4b9895e83007d3b1f9ea4463a97c0fdd9a341
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/charmap.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 321786584d3f..5da4f6e3b248 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; } } |