From 9c10e29287740f473fa4f33ac6188b8c8543bfbb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 19 Aug 2019 15:10:37 +0200 Subject: loplugin:constvars in chart2..connectivity Change-Id: I35d450b022af870df4e57714363892554a4ae917 Reviewed-on: https://gerrit.libreoffice.org/77722 Tested-by: Jenkins Reviewed-by: Noel Grandin --- comphelper/source/misc/backupfilehelper.cxx | 2 +- comphelper/source/misc/lok.cxx | 2 +- comphelper/source/property/MasterPropertySet.cxx | 2 +- comphelper/source/property/MasterPropertySetInfo.cxx | 2 +- comphelper/source/property/propertycontainerhelper.cxx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx index c60f9fa6e75e..113edfbea845 100644 --- a/comphelper/source/misc/backupfilehelper.cxx +++ b/comphelper/source/misc/backupfilehelper.cxx @@ -1518,7 +1518,7 @@ namespace if (bRetval) { // write headers - for (auto& candidate : maPackedFileEntryVector) + for (const auto& candidate : maPackedFileEntryVector) { if (!candidate.write_header(aHandle)) { diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx index 0c43c3fc0822..c06d7e87d9b8 100644 --- a/comphelper/source/misc/lok.cxx +++ b/comphelper/source/misc/lok.cxx @@ -186,7 +186,7 @@ bool isWhitelistedLanguage(const OUString& lang) if (aWhitelist.empty()) return false; - for (auto& entry : aWhitelist) + for (const auto& entry : aWhitelist) { if (lang.startsWith(entry)) return true; diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx index 3c339ef6d6f0..61e6f84ecdd5 100644 --- a/comphelper/source/property/MasterPropertySet.cxx +++ b/comphelper/source/property/MasterPropertySet.cxx @@ -67,7 +67,7 @@ MasterPropertySet::MasterPropertySet( comphelper::MasterPropertySetInfo* pInfo, MasterPropertySet::~MasterPropertySet() throw() { - for( auto& rSlave : maSlaveMap ) + for( const auto& rSlave : maSlaveMap ) delete rSlave.second; } diff --git a/comphelper/source/property/MasterPropertySetInfo.cxx b/comphelper/source/property/MasterPropertySetInfo.cxx index 6aa017de92da..1b1a2249ec08 100644 --- a/comphelper/source/property/MasterPropertySetInfo.cxx +++ b/comphelper/source/property/MasterPropertySetInfo.cxx @@ -40,7 +40,7 @@ MasterPropertySetInfo::MasterPropertySetInfo( PropertyInfo const * pMap ) MasterPropertySetInfo::~MasterPropertySetInfo() throw() { - for( auto& rObj : maMap ) + for( const auto& rObj : maMap ) delete rObj.second; } diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx index 623ff7bb09eb..e25743342136 100644 --- a/comphelper/source/property/propertycontainerhelper.cxx +++ b/comphelper/source/property/propertycontainerhelper.cxx @@ -176,7 +176,7 @@ namespace void OPropertyContainerHelper::implPushBackProperty(const PropertyDescription& _rProp) { #ifdef DBG_UTIL - for (auto& checkConflicts : m_aProperties) + for (const auto& checkConflicts : m_aProperties) { OSL_ENSURE(checkConflicts.aProperty.Name != _rProp.aProperty.Name, "OPropertyContainerHelper::implPushBackProperty: name already exists!"); OSL_ENSURE(checkConflicts.aProperty.Handle != _rProp.aProperty.Handle, "OPropertyContainerHelper::implPushBackProperty: handle already exists!"); -- cgit