diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-05-22 13:49:30 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-05-22 16:35:20 +0200 |
commit | c18e2ea2a52fc171c50fcb22d431e94c6aececc5 (patch) | |
tree | a63721b18626947e5278a51feb7fd64604e80eee /connectivity/source/drivers | |
parent | 7cf4bcef41448218f76fa1e974f541e13dc03023 (diff) |
New loplugin:data
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data
to &vector[0]"
Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01
Reviewed-on: https://gerrit.libreoffice.org/72765
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity/source/drivers')
-rw-r--r-- | connectivity/source/drivers/dbase/DDriver.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/file/FDriver.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/flat/EDriver.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HDriver.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/jdbc/JDriver.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/mysql_jdbc/YDriver.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/mysqlc/mysqlc_driver.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/odbc/ODriver.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_connection.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_tools.cxx | 2 |
10 files changed, 10 insertions, 10 deletions
diff --git a/connectivity/source/drivers/dbase/DDriver.cxx b/connectivity/source/drivers/dbase/DDriver.cxx index eae07c4707fa..376fd27c10c2 100644 --- a/connectivity/source/drivers/dbase/DDriver.cxx +++ b/connectivity/source/drivers/dbase/DDriver.cxx @@ -105,7 +105,7 @@ Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const OUString ,"0" ,aBoolean) ); - return Sequence< DriverPropertyInfo >(&(aDriverInfo[0]),aDriverInfo.size()); + return Sequence< DriverPropertyInfo >(aDriverInfo.data(),aDriverInfo.size()); } SharedResources aResources; diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx index fd55eb5bb62a..e3a756672b65 100644 --- a/connectivity/source/drivers/file/FDriver.cxx +++ b/connectivity/source/drivers/file/FDriver.cxx @@ -161,7 +161,7 @@ Sequence< DriverPropertyInfo > SAL_CALL OFileDriver::getPropertyInfo( const OUSt ,OUString() ,Sequence< OUString >()) ); - return Sequence< DriverPropertyInfo >(&(aDriverInfo[0]),aDriverInfo.size()); + return Sequence< DriverPropertyInfo >(aDriverInfo.data(),aDriverInfo.size()); } // if ( acceptsURL(url) ) { ::connectivity::SharedResources aResources; diff --git a/connectivity/source/drivers/flat/EDriver.cxx b/connectivity/source/drivers/flat/EDriver.cxx index e6d9c87a07ee..4c9ac55933e7 100644 --- a/connectivity/source/drivers/flat/EDriver.cxx +++ b/connectivity/source/drivers/flat/EDriver.cxx @@ -123,7 +123,7 @@ Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const OUString ,aBoolean) ); return ::comphelper::concatSequences(OFileDriver::getPropertyInfo(url,info ), - Sequence< DriverPropertyInfo >(&aDriverInfo[0],aDriverInfo.size())); + Sequence< DriverPropertyInfo >(aDriverInfo.data(),aDriverInfo.size())); } ::connectivity::SharedResources aResources; const OUString sMessage = aResources.getResourceString(STR_URI_SYNTAX_ERROR); diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 4e495204e75a..c80826d4a79b 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -428,7 +428,7 @@ namespace connectivity ,"CALL IDENTITY()" ,Sequence< OUString >()) ); - return Sequence< DriverPropertyInfo >(&aDriverInfo[0],aDriverInfo.size()); + return Sequence< DriverPropertyInfo >(aDriverInfo.data(),aDriverInfo.size()); } diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx index 888eb3f8d2f3..8e537c2d08e3 100644 --- a/connectivity/source/drivers/jdbc/JDriver.cxx +++ b/connectivity/source/drivers/jdbc/JDriver.cxx @@ -229,7 +229,7 @@ Sequence< DriverPropertyInfo > SAL_CALL java_sql_Driver::getPropertyInfo( const ,OUString( ) ,Sequence< OUString > ()) ); - return Sequence< DriverPropertyInfo >(&aDriverInfo[0],aDriverInfo.size()); + return Sequence< DriverPropertyInfo >(aDriverInfo.data(),aDriverInfo.size()); } ::connectivity::SharedResources aResources; const OUString sMessage = aResources.getResourceString(STR_URI_SYNTAX_ERROR); diff --git a/connectivity/source/drivers/mysql_jdbc/YDriver.cxx b/connectivity/source/drivers/mysql_jdbc/YDriver.cxx index 77906f6f3551..0d53ebe0d986 100644 --- a/connectivity/source/drivers/mysql_jdbc/YDriver.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YDriver.cxx @@ -326,7 +326,7 @@ ODriverDelegator::getPropertyInfo(const OUString& url, const Sequence<PropertyVa OUString(), Sequence<OUString>())); } - return Sequence<DriverPropertyInfo>(&aDriverInfo[0], aDriverInfo.size()); + return Sequence<DriverPropertyInfo>(aDriverInfo.data(), aDriverInfo.size()); } sal_Int32 SAL_CALL ODriverDelegator::getMajorVersion() { return 1; } diff --git a/connectivity/source/drivers/mysqlc/mysqlc_driver.cxx b/connectivity/source/drivers/mysqlc/mysqlc_driver.cxx index ee2a61a61f9f..0f6c90922e5f 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_driver.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_driver.cxx @@ -114,7 +114,7 @@ MysqlCDriver::getPropertyInfo(const OUString& url, const Sequence<PropertyValue> Sequence<OUString>())); aDriverInfo.push_back( DriverPropertyInfo("Port", "Port", true, "3306", Sequence<OUString>())); - return Sequence<DriverPropertyInfo>(&(aDriverInfo[0]), aDriverInfo.size()); + return Sequence<DriverPropertyInfo>(aDriverInfo.data(), aDriverInfo.size()); } return Sequence<DriverPropertyInfo>(); diff --git a/connectivity/source/drivers/odbc/ODriver.cxx b/connectivity/source/drivers/odbc/ODriver.cxx index 5960925bf7c7..642413bb82f0 100644 --- a/connectivity/source/drivers/odbc/ODriver.cxx +++ b/connectivity/source/drivers/odbc/ODriver.cxx @@ -187,7 +187,7 @@ Sequence< DriverPropertyInfo > SAL_CALL ODBCDriver::getPropertyInfo( const OUStr ,aBooleanValues) ); - return Sequence< DriverPropertyInfo >(&aDriverInfo[0],aDriverInfo.size()); + return Sequence< DriverPropertyInfo >(aDriverInfo.data(),aDriverInfo.size()); } ::connectivity::SharedResources aResources; const OUString sMessage = aResources.getResourceString(STR_URI_SYNTAX_ERROR); diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx index 8a8f2d4ca3c0..21c310fef15e 100644 --- a/connectivity/source/drivers/postgresql/pq_connection.cxx +++ b/connectivity/source/drivers/postgresql/pq_connection.cxx @@ -424,7 +424,7 @@ public: // This const_cast is there for compatibility with PostgreSQL <= 9.1; // PostgreSQL >= 9.2 has the right const qualifiers in the headers // for a return type of "char const*const*". - char const** c_array() const { return const_cast <const char**>(&values[0]); } + char const** c_array() const { return const_cast <const char**>(values.data()); } }; static void properties2arrays( const Sequence< PropertyValue > & args, diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index 39d4604e098b..fd691f2ec079 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.cxx +++ b/connectivity/source/drivers/postgresql/pq_tools.cxx @@ -894,7 +894,7 @@ css::uno::Sequence< sal_Int32 > string2intarray( const OUString & str ) } while( true ); // vec is guaranteed non-empty assert(vec.size() > 0); - ret = css::uno::Sequence< sal_Int32 > ( &vec[0] , vec.size() ); + ret = css::uno::Sequence< sal_Int32 > ( vec.data() , vec.size() ); } return ret; } |