[Libreoffice-commits] core.git: svtools/source
Julien Nabet
serval2412 at yahoo.fr
Sun Jul 12 03:30:57 PDT 2015
svtools/source/graphic/grfcache.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 6ca90a0fc42a5f010ff9c8dc87011516eb5053c1
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Jul 11 23:57:24 2015 +0200
Optimize a bit GraphicCache::GetUniqueID
Don't call twice ImplGetCacheEntry when TryToSwapIn hasn't been called
Change-Id: I0a808801c94c8179a4f5d863648907b4102f6564
Reviewed-on: https://gerrit.libreoffice.org/16958
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Zolnai Tamás <zolnaitamas2000 at gmail.com>
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index fb1c9fa..3c0dbd3 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -1074,10 +1074,11 @@ OString GraphicCache::GetUniqueID( const GraphicObject& rObj ) const
// ensure that the entry is correctly initialized (it has to be read at least once)
if( pEntry && pEntry->GetID().IsEmpty() )
+ {
pEntry->TryToSwapIn();
-
- // do another call to ImplGetCacheEntry in case of modified entry list
- pEntry = const_cast<GraphicCache*>(this)->ImplGetCacheEntry( rObj );
+ // do another call to ImplGetCacheEntry in case of modified entry list
+ pEntry = const_cast<GraphicCache*>(this)->ImplGetCacheEntry( rObj );
+ }
if( pEntry )
aRet = pEntry->GetID().GetIDString();
More information about the Libreoffice-commits
mailing list