summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-05 13:27:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-06 08:35:23 +0200
commitab9b38a4064141705aa3a3de9a5d73b465ad3af3 (patch)
tree888fcc6b517c44d77e2d297c13ee84fb487dd7a7 /connectivity
parent13341ffa49d58f313a05edae4f4f04c215658e9f (diff)
use more begin()/end() for Sequence
Change-Id: I399be6b6ef7a6ce01e883569a177c0969bc29c69
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/dbtools.cxx4
-rw-r--r--connectivity/source/commontools/dbtools2.cxx4
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx7
-rw-r--r--connectivity/source/drivers/jdbc/JConnection.cxx11
4 files changed, 10 insertions, 16 deletions
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 24eee42a4cf2..109217552183 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1375,8 +1375,8 @@ OUString createUniqueName( const Sequence< OUString >& _rNames, const OUString&
{
std::set< OUString > aUsedNames;
std::copy(
- _rNames.getConstArray(),
- _rNames.getConstArray() + _rNames.getLength(),
+ _rNames.begin(),
+ _rNames.end(),
std::insert_iterator< std::set< OUString > >( aUsedNames, aUsedNames.end() )
);
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 000cd740f513..c7097ae960e7 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -637,8 +637,8 @@ bool isDataSourcePropertyEnabled(const Reference<XInterface>& _xProp, const OUSt
{
Sequence< PropertyValue > aInfo;
xProp->getPropertyValue("Info") >>= aInfo;
- const PropertyValue* pValue =std::find_if(aInfo.getConstArray(),
- aInfo.getConstArray() + aInfo.getLength(),
+ const PropertyValue* pValue =std::find_if(aInfo.begin(),
+ aInfo.end(),
std::bind2nd(TPropertyValueEqualFunctor(),_sProperty));
if ( pValue && pValue != (aInfo.getConstArray() + aInfo.getLength()) )
pValue->Value >>= bEnabled;
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 5face6249692..d86826fc6504 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -149,13 +149,10 @@ namespace connectivity
OUStringBuffer aPermittedMethods;
Sequence< OUString > aNodeNames( aConfig.getNodeNames() );
- for ( const OUString* pNodeNames = aNodeNames.getConstArray();
- pNodeNames != aNodeNames.getConstArray() + aNodeNames.getLength();
- ++pNodeNames
- )
+ for ( auto const & nodeName : aNodeNames )
{
OUString sPermittedMethod;
- OSL_VERIFY( aConfig.getNodeValue( *pNodeNames ) >>= sPermittedMethod );
+ OSL_VERIFY( aConfig.getNodeValue( nodeName ) >>= sPermittedMethod );
if ( !aPermittedMethods.isEmpty() )
aPermittedMethods.append( ';' );
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index 4239aca287da..d451148fc988 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -633,17 +633,14 @@ namespace
if ( nSetPropertyMethodID == nullptr )
return false;
- for ( const NamedValue* pSystemProp = _rSystemProperties.getConstArray();
- pSystemProp != _rSystemProperties.getConstArray() + _rSystemProperties.getLength();
- ++pSystemProp
- )
+ for ( auto const & systemProp : _rSystemProperties )
{
OUString sValue;
- OSL_VERIFY( pSystemProp->Value >>= sValue );
+ OSL_VERIFY( systemProp.Value >>= sValue );
- _rLogger.log( LogLevel::FINER, STR_LOG_SETTING_SYSTEM_PROPERTY, pSystemProp->Name, sValue );
+ _rLogger.log( LogLevel::FINER, STR_LOG_SETTING_SYSTEM_PROPERTY, systemProp.Name, sValue );
- LocalRef< jstring > jName( _rEnv, convertwchar_tToJavaString( &_rEnv, pSystemProp->Name ) );
+ LocalRef< jstring > jName( _rEnv, convertwchar_tToJavaString( &_rEnv, systemProp.Name ) );
LocalRef< jstring > jValue( _rEnv, convertwchar_tToJavaString( &_rEnv, sValue ) );
_rEnv.CallStaticObjectMethod( systemClass.get(), nSetPropertyMethodID, jName.get(), jValue.get() );