summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-08-25 20:24:24 +0200
committerMichael Stahl <mstahl@redhat.com>2013-08-26 21:21:40 +0000
commit1b1f49f5d6f9d45992b427d9b2a897e329c7b297 (patch)
treeb80cdff53f932fb826a0b98e080dccd431c40fdd /vcl
parent87cf1b730e771f18d5f0a110b98ffab6494d3b25 (diff)
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.cxx8
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 );
}
}
}