From 95dd183c41c52aa0ed9b5223ae7584f486103a78 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 20 Aug 2019 14:02:06 +0200 Subject: loplugin:constvars in solenv..svtools Change-Id: Ieb0116321bbddd804db6d1789ea3521c5b220840 Reviewed-on: https://gerrit.libreoffice.org/77807 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svl/source/items/IndexedStyleSheets.cxx | 2 +- svl/source/items/poolcach.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'svl') diff --git a/svl/source/items/IndexedStyleSheets.cxx b/svl/source/items/IndexedStyleSheets.cxx index 233c10e56093..4d71e7e6ff95 100644 --- a/svl/source/items/IndexedStyleSheets.cxx +++ b/svl/source/items/IndexedStyleSheets.cxx @@ -186,7 +186,7 @@ IndexedStyleSheets::FindStyleSheetPosition(const SfxStyleSheetBase& style) const void IndexedStyleSheets::Clear(StyleSheetDisposer& disposer) { - for (auto& rxStyleSheet : mStyleSheets) { + for (const auto& rxStyleSheet : mStyleSheets) { disposer.Dispose(rxStyleSheet); } mStyleSheets.clear(); diff --git a/svl/source/items/poolcach.cxx b/svl/source/items/poolcach.cxx index 1ff06ab402a0..23a4c1629f0e 100644 --- a/svl/source/items/poolcach.cxx +++ b/svl/source/items/poolcach.cxx @@ -45,7 +45,7 @@ SfxItemPoolCache::SfxItemPoolCache( SfxItemPool *pItemPool, SfxItemPoolCache::~SfxItemPoolCache() { - for (SfxItemModifyImpl & rImpl : m_aCache) { + for (const SfxItemModifyImpl & rImpl : m_aCache) { pPool->Remove( *rImpl.pPoolItem ); pPool->Remove( *rImpl.pOrigItem ); } @@ -62,7 +62,7 @@ const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem ) "original not in pool" ); // Find whether this Transformations ever occurred - for (SfxItemModifyImpl & rMapEntry : m_aCache) + for (const SfxItemModifyImpl & rMapEntry : m_aCache) { if ( rMapEntry.pOrigItem == &rOrigItem ) { -- cgit