vcl/generic/glyphs/glyphcache.cxx |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 1b1f49f5d6f9d45992b427d9b2a897e329c7b297
Author: Julien Nabet <serval2...@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 <mst...@redhat.com>
    Tested-by: Michael Stahl <mst...@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 );
         }
     }
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to