diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-08-25 20:24:24 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-08-26 21:21:40 +0000 |
commit | 1b1f49f5d6f9d45992b427d9b2a897e329c7b297 (patch) | |
tree | b80cdff53f932fb826a0b98e080dccd431c40fdd /vcl | |
parent | Fix iterator management (diff) | |
download | core-1b1f49f5d6f9d45992b427d9b2a897e329c7b297.tar.gz core-1b1f49f5d6f9d45992b427d9b2a897e329c7b297.zip |
Simplify iterator management (part2)
Change-Id: Id4efe9b7c3831c09043644ad2445cd8f00aecd66
Reviewed-on: https://gerrit.libreoffice.org/5628
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/glyphs/glyphcache.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx index 43c628dd1688..f9a2ee36c3bb 100644 --- a/vcl/generic/glyphs/glyphcache.cxx +++ b/vcl/generic/glyphs/glyphcache.cxx @@ -363,18 +363,16 @@ GlyphData& ServerFont::GetGlyphData( int nGlyphIndex ) void ServerFont::GarbageCollect( long nMinLruIndex ) { - GlyphList::iterator it_next = maGlyphList.begin(); - while( it_next != maGlyphList.end() ) + GlyphList::iterator it = maGlyphList.begin(); + while( it != maGlyphList.end() ) { - GlyphList::iterator it = it_next++; GlyphData& rGD = it->second; if( (nMinLruIndex - rGD.GetLruValue()) > 0 ) { OSL_ASSERT( mnBytesUsed >= sizeof(GlyphData) ); mnBytesUsed -= sizeof( GlyphData ); GlyphCache::GetInstance().RemovingGlyph( rGD ); - maGlyphList.erase( it ); - it_next = maGlyphList.begin(); + it = maGlyphList.erase( it ); } } } |