[Libreoffice-commits] core.git: vcl/generic
Julien Nabet
serval2412 at yahoo.fr
Mon Aug 26 14:22:03 PDT 2013
vcl/generic/glyphs/glyphcache.cxx | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
New commits:
commit 1b1f49f5d6f9d45992b427d9b2a897e329c7b297
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun Aug 25 20:24:24 2013 +0200
Simplify iterator management (part2)
Change-Id: Id4efe9b7c3831c09043644ad2445cd8f00aecd66
Reviewed-on: https://gerrit.libreoffice.org/5628
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index 43c628d..f9a2ee3 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 );
}
}
}
More information about the Libreoffice-commits
mailing list