diff options
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/commontools/ConnectionWrapper.cxx | 3 | ||||
-rw-r--r-- | connectivity/source/commontools/dbtools2.cxx | 6 | ||||
-rw-r--r-- | connectivity/source/drivers/jdbc/JStatement.cxx | 5 | ||||
-rw-r--r-- | connectivity/source/drivers/odbc/OStatement.cxx | 5 | ||||
-rw-r--r-- | connectivity/source/sdbcx/VDescriptor.cxx | 5 |
5 files changed, 14 insertions, 10 deletions
diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx index 264002e5dc57..252882067865 100644 --- a/connectivity/source/commontools/ConnectionWrapper.cxx +++ b/connectivity/source/commontools/ConnectionWrapper.cxx @@ -199,7 +199,8 @@ void OConnectionWrapper::createUniqueId( const OUString& _rURL if ( !_rPassword.isEmpty() ) sha1.update(reinterpret_cast<unsigned char const*>(_rPassword.getStr()), _rPassword.getLength() * sizeof(sal_Unicode)); // now we need to sort the properties - std::sort(_rInfo.begin(),_rInfo.end(),TPropertyValueLessFunctor()); + auto [begin, end] = toNonConstRange(_rInfo); + std::sort(begin,end,TPropertyValueLessFunctor()); for (PropertyValue const & prop : std::as_const(_rInfo)) { diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index c0cefeaa1b13..0adfe23bdac9 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -637,11 +637,11 @@ bool isDataSourcePropertyEnabled(const Reference<XInterface>& _xProp, const OUSt { Sequence< PropertyValue > aInfo; xProp->getPropertyValue("Info") >>= aInfo; - const PropertyValue* pValue =std::find_if(aInfo.begin(), - aInfo.end(), + const PropertyValue* pValue =std::find_if(std::cbegin(aInfo), + std::cend(aInfo), [&_sProperty](const PropertyValue& lhs) { return lhs.Name == _sProperty; }); - if ( pValue != aInfo.end() ) + if ( pValue != std::cend(aInfo) ) pValue->Value >>= bEnabled; } } diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx index 40fef64ed5ac..da06ef77f2c3 100644 --- a/connectivity/source/drivers/jdbc/JStatement.cxx +++ b/connectivity/source/drivers/jdbc/JStatement.cxx @@ -124,9 +124,10 @@ Sequence< Type > SAL_CALL java_sql_Statement_Base::getTypes( ) Sequence< Type > aOldTypes = java_sql_Statement_BASE::getTypes(); if ( m_pConnection.is() && !m_pConnection->isAutoRetrievingEnabled() ) { - auto newEnd = std::remove(aOldTypes.begin(), aOldTypes.end(), + auto [begin, end] = toNonConstRange(aOldTypes); + auto newEnd = std::remove(begin, end, cppu::UnoType<XGeneratedResultSet>::get()); - aOldTypes.realloc(std::distance(aOldTypes.begin(), newEnd)); + aOldTypes.realloc(std::distance(begin, newEnd)); } return ::comphelper::concatSequences(aTypes.getTypes(),aOldTypes); diff --git a/connectivity/source/drivers/odbc/OStatement.cxx b/connectivity/source/drivers/odbc/OStatement.cxx index c5d63ef771a8..13ffeda8e4ba 100644 --- a/connectivity/source/drivers/odbc/OStatement.cxx +++ b/connectivity/source/drivers/odbc/OStatement.cxx @@ -131,9 +131,10 @@ Sequence< Type > SAL_CALL OStatement_Base::getTypes( ) Sequence< Type > aOldTypes = OStatement_BASE::getTypes(); if ( m_pConnection.is() && !m_pConnection->isAutoRetrievingEnabled() ) { - auto newEnd = std::remove(aOldTypes.begin(), aOldTypes.end(), + auto [begin, end] = toNonConstRange(aOldTypes); + auto newEnd = std::remove(begin, end, cppu::UnoType<XGeneratedResultSet>::get()); - aOldTypes.realloc(std::distance(aOldTypes.begin(), newEnd)); + aOldTypes.realloc(std::distance(begin, newEnd)); } return ::comphelper::concatSequences(aTypes.getTypes(),aOldTypes); diff --git a/connectivity/source/sdbcx/VDescriptor.cxx b/connectivity/source/sdbcx/VDescriptor.cxx index 9023a2076a74..2392e2d5f1d2 100644 --- a/connectivity/source/sdbcx/VDescriptor.cxx +++ b/connectivity/source/sdbcx/VDescriptor.cxx @@ -74,10 +74,11 @@ namespace connectivity::sdbcx Sequence< Property > aProperties; describeProperties( aProperties ); + auto [begin, end] = toNonConstRange(aProperties); if ( isNew() ) - std::for_each( aProperties.begin(), aProperties.end(), ResetROAttribute() ); + std::for_each( begin, end, ResetROAttribute() ); else - std::for_each( aProperties.begin(), aProperties.end(), SetROAttribute() ); + std::for_each( begin, end, SetROAttribute() ); return new ::cppu::OPropertyArrayHelper( aProperties ); } |