From 72fe2e3003b89b4d6bc7a87e0dc5ce85dd043b45 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sat, 13 Oct 2012 16:06:44 +0200 Subject: Prefer prefix ++/-- operators for non-primitive types + replace "<" by "!=" for end iterator comparison with current it Change-Id: I6e90caa8752c7057cca8c74fca12c0a050544dbb --- sot/source/sdstor/stgcache.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sot') diff --git a/sot/source/sdstor/stgcache.cxx b/sot/source/sdstor/stgcache.cxx index 00c20d4cc3cf..f2d22e50a639 100644 --- a/sot/source/sdstor/stgcache.cxx +++ b/sot/source/sdstor/stgcache.cxx @@ -135,7 +135,7 @@ void StgCache::Erase( const rtl::Reference< StgPage > &xElem ) { OSL_ENSURE( xElem.is(), "The pointer should not be NULL!" ); if ( xElem.is() ) { - for ( LRUList::iterator it = maLRUPages.begin(); it != maLRUPages.end(); it++ ) { + for ( LRUList::iterator it = maLRUPages.begin(); it != maLRUPages.end(); ++it ) { if ( it->is() && (*it)->GetPage() == xElem->GetPage() ) { it->clear(); break; @@ -149,7 +149,7 @@ void StgCache::Erase( const rtl::Reference< StgPage > &xElem ) void StgCache::Clear() { maDirtyPages.clear(); - for ( LRUList::iterator it = maLRUPages.begin(); it != maLRUPages.end(); it++ ) + for ( LRUList::iterator it = maLRUPages.begin(); it != maLRUPages.end(); ++it ) it->clear(); } @@ -157,7 +157,7 @@ void StgCache::Clear() rtl::Reference< StgPage > StgCache::Find( sal_Int32 nPage ) { - for ( LRUList::iterator it = maLRUPages.begin(); it != maLRUPages.end(); it++ ) + for ( LRUList::iterator it = maLRUPages.begin(); it != maLRUPages.end(); ++it ) if ( it->is() && (*it)->GetPage() == nPage ) return *it; IndexToStgPage::iterator it2 = maDirtyPages.find( nPage ); @@ -216,12 +216,12 @@ sal_Bool StgCache::Commit() { std::vector< StgPage * > aToWrite; for ( IndexToStgPage::iterator aIt = maDirtyPages.begin(); - aIt != maDirtyPages.end(); aIt++ ) + aIt != maDirtyPages.end(); ++aIt ) aToWrite.push_back( aIt->second.get() ); std::sort( aToWrite.begin(), aToWrite.end(), StgPage::IsPageGreater ); for ( std::vector< StgPage * >::iterator aWr = aToWrite.begin(); - aWr != aToWrite.end(); aWr++) + aWr != aToWrite.end(); ++aWr) { const rtl::Reference< StgPage > &pPage = *aWr; if ( !Write( pPage->GetPage(), pPage->GetData(), 1 ) ) -- cgit