diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-10 14:39:07 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-11 06:54:34 +0000 |
commit | 265068d65b39688b8a4756dfbcd46453dd1f9b70 (patch) | |
tree | 6936185b2f2f46b99646d00e542cdde845ef073d /svl/source/items/poolcach.cxx | |
parent | 9e0335d1db22bd3ad3f4bb249b30a00fd55558f4 (diff) |
clang-tidy modernize-loop-convert in scripting to svtools
Change-Id: I98229d14109cf243839d632feabde1391ea9bad5
Reviewed-on: https://gerrit.libreoffice.org/24847
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svl/source/items/poolcach.cxx')
-rw-r--r-- | svl/source/items/poolcach.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/svl/source/items/poolcach.cxx b/svl/source/items/poolcach.cxx index 994884baedf5..947aee32795d 100644 --- a/svl/source/items/poolcach.cxx +++ b/svl/source/items/poolcach.cxx @@ -48,9 +48,9 @@ SfxItemPoolCache::SfxItemPoolCache( SfxItemPool *pItemPool, SfxItemPoolCache::~SfxItemPoolCache() { - for ( size_t nPos = 0; nPos < pCache->size(); ++nPos ) { - pPool->Remove( *(*pCache)[nPos].pPoolItem ); - pPool->Remove( *(*pCache)[nPos].pOrigItem ); + for (SfxItemModifyImpl & rImpl : *pCache) { + pPool->Remove( *rImpl.pPoolItem ); + pPool->Remove( *rImpl.pOrigItem ); } delete pCache; pCache = nullptr; @@ -66,9 +66,8 @@ const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem ) "original not in pool" ); // Find whether this Transformations ever occurred - for ( size_t nPos = 0; nPos < pCache->size(); ++nPos ) + for (SfxItemModifyImpl & rMapEntry : *pCache) { - SfxItemModifyImpl &rMapEntry = (*pCache)[nPos]; if ( rMapEntry.pOrigItem == &rOrigItem ) { // Did anything change at all? |