[Libreoffice-commits] .: svtools/source
David Tardon
dtardon at kemper.freedesktop.org
Thu Jul 14 22:54:31 PDT 2011
svtools/source/graphic/grfcache.cxx | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
New commits:
commit 1cff46f291b5550184b1a0176e0da87ef900ea8d
Author: David Tardon <dtardon at redhat.com>
Date: Fri Jul 15 07:51:13 2011 +0200
error: attempt to increment a singular iterator
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index 8b24acc..dc8ddd9 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -325,21 +325,19 @@ void GraphicCacheEntry::AddGraphicObjectReference( const GraphicObject& rObj, Gr
bool GraphicCacheEntry::ReleaseGraphicObjectReference( const GraphicObject& rObj )
{
- bool bRet = false;
-
for(
GraphicObjectList_impl::iterator it = maGraphicObjectList.begin();
- ( it < maGraphicObjectList.end() ) && !bRet;
+ it != maGraphicObjectList.end();
++it
) {
if( &rObj == *it )
{
maGraphicObjectList.erase( it );
- bRet = true;
+ return true;
}
}
- return bRet;
+ return false;
}
// -----------------------------------------------------------------------------
More information about the Libreoffice-commits
mailing list