diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-15 11:05:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-15 11:59:02 +0200 |
commit | fe00a724a918606e5c8c2c32b155bc50b33d56bd (patch) | |
tree | c638ef9b9ca8d354a911feb82d6905f10861f0bc /connectivity | |
parent | 5827e30109b683cb74efa21d154e5219fe9e2a0c (diff) |
loplugin:sequenceloop in basic..cui
Change-Id: I15d825de3201808d188b461415f78a4d81b64127
Reviewed-on: https://gerrit.libreoffice.org/77494
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
5 files changed, 7 insertions, 6 deletions
diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx index bf882ee1bdd6..e5a10447316e 100644 --- a/connectivity/source/commontools/ConnectionWrapper.cxx +++ b/connectivity/source/commontools/ConnectionWrapper.cxx @@ -206,7 +206,7 @@ void OConnectionWrapper::createUniqueId( const OUString& _rURL // now we need to sort the properties std::sort(_rInfo.begin(),_rInfo.end(),TPropertyValueLessFunctor()); - for (PropertyValue const & prop : _rInfo) + for (PropertyValue const & prop : std::as_const(_rInfo)) { // we only include strings an integer values OUString sValue; @@ -222,7 +222,7 @@ void OConnectionWrapper::createUniqueId( const OUString& _rURL Sequence< OUString> aSeq; if ( prop.Value >>= aSeq ) { - for(OUString const & s : aSeq) + for(OUString const & s : std::as_const(aSeq)) sha1.update(reinterpret_cast<unsigned char const*>(s.getStr()), s.getLength() * sizeof(sal_Unicode)); } } diff --git a/connectivity/source/commontools/paramwrapper.cxx b/connectivity/source/commontools/paramwrapper.cxx index 54b381b72bb7..aae53c2d2a0f 100644 --- a/connectivity/source/commontools/paramwrapper.cxx +++ b/connectivity/source/commontools/paramwrapper.cxx @@ -131,7 +131,8 @@ namespace param OUString ParameterWrapper::impl_getPseudoAggregatePropertyName( sal_Int32 _nHandle ) const { Reference< XPropertySetInfo > xInfo = const_cast<ParameterWrapper*>( this )->getPropertySetInfo(); - for ( const Property& rProperty : xInfo->getProperties() ) + const css::uno::Sequence<Property> aProperties = xInfo->getProperties(); + for ( const Property& rProperty : aProperties ) { if ( rProperty.Handle == _nHandle ) return rProperty.Name; diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 56c22443d0da..17fb9de34676 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -149,7 +149,7 @@ namespace connectivity _rxContext, aConfigPath.makeStringAndClear() ) ); OUStringBuffer aPermittedMethods; - Sequence< OUString > aNodeNames( aConfig.getNodeNames() ); + const Sequence< OUString > aNodeNames( aConfig.getNodeNames() ); for ( auto const & nodeName : aNodeNames ) { OUString sPermittedMethod; diff --git a/connectivity/source/drivers/mork/MColumnAlias.cxx b/connectivity/source/drivers/mork/MColumnAlias.cxx index a5b178d47178..1c9badd3280f 100644 --- a/connectivity/source/drivers/mork/MColumnAlias.cxx +++ b/connectivity/source/drivers/mork/MColumnAlias.cxx @@ -91,7 +91,7 @@ void OColumnAlias::initialize( const css::uno::Reference< css::lang::XMultiServi com_sun_star_comp_sdbc_MozabDriver::ColumnAliases::get( comphelper::getComponentContext(_rxORB)), UNO_QUERY_THROW); - Sequence< OUString > aProgrammaticNames(xAliasesNode->getElementNames()); + const Sequence< OUString > aProgrammaticNames(xAliasesNode->getElementNames()); for (const auto& rProgrammaticName : aProgrammaticNames) { OString sAsciiProgrammaticName( OUStringToOString( diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index 2a9f3e1de08f..c88e117414fa 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -354,7 +354,7 @@ void OSDBCDriverManager::initializeDriverPrecedence() // at the moment this is the first of all drivers we know // loop through the names in the precedence order - for ( const OUString& rDriverOrder : aDriverOrder ) + for ( const OUString& rDriverOrder : std::as_const(aDriverOrder) ) { if (aNoPrefDriversStart == m_aDriversBS.end()) break; |