From ff6e8c73adef7c86db12287948025954a4fc7746 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 20 Aug 2019 11:16:20 +0200 Subject: loplugin:constvars in sccomp..sd Change-Id: Ic4b2a1d23da80a5b0976692f490c29a7169be3ef Reviewed-on: https://gerrit.libreoffice.org/77793 Tested-by: Jenkins Reviewed-by: Noel Grandin --- scripting/source/provider/BrowseNodeFactoryImpl.cxx | 2 +- scripting/source/provider/MasterScriptProvider.cxx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'scripting/source/provider') diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx index 92ce1be6c273..83d3cbec80aa 100644 --- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx +++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx @@ -190,7 +190,7 @@ public: Sequence< Reference< browse::XBrowseNode > > children( m_hBNA->size() ); sal_Int32 index = 0; - for ( auto& str : m_vStr ) + for ( const auto& str : m_vStr ) { children[ index ].set( m_hBNA->find( str )->second ); ++index; diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index 8fb19dc8ac09..7a5475541179 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -456,7 +456,8 @@ template bool FindProviderAndApply(ProviderCache& rCache, Proc p auto pass = [&rCache, &p]() -> bool { bool bResult = false; - for (auto& rProv : rCache.getAllProviders()) + const Sequence> aAllProviders = rCache.getAllProviders(); + for (const auto& rProv : aAllProviders) { Reference xCont(rProv, UNO_QUERY); if (!xCont.is()) -- cgit v1.2.3