summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-08-19 15:10:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-08-19 19:28:03 +0200
commit9c10e29287740f473fa4f33ac6188b8c8543bfbb (patch)
treec46ec88b5fe6156ac8a3dc27632b71a4a691938b /connectivity/source/drivers
parent16da5e2cc9add87aa44783af270f63de01e7ced4 (diff)
loplugin:constvars in chart2..connectivity
Change-Id: I35d450b022af870df4e57714363892554a4ae917 Reviewed-on: https://gerrit.libreoffice.org/77722 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/drivers')
-rw-r--r--connectivity/source/drivers/evoab2/NDriver.cxx2
-rw-r--r--connectivity/source/drivers/file/fcode.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx6
-rw-r--r--connectivity/source/drivers/mork/MDatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_preparedstatement.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_updateableresultset.cxx2
6 files changed, 10 insertions, 10 deletions
diff --git a/connectivity/source/drivers/evoab2/NDriver.cxx b/connectivity/source/drivers/evoab2/NDriver.cxx
index 9cbb265fce2a..fdbebf0000f4 100644
--- a/connectivity/source/drivers/evoab2/NDriver.cxx
+++ b/connectivity/source/drivers/evoab2/NDriver.cxx
@@ -55,7 +55,7 @@ void OEvoabDriver::disposing()
::osl::MutexGuard aGuard(m_aMutex);
// when driver will be destroyed so all our connections have to be destroyed as well
- for (auto& rxConnection : m_xConnections)
+ for (const auto& rxConnection : m_xConnections)
{
Reference< XComponent > xComp(rxConnection.get(), UNO_QUERY);
if (xComp.is())
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index e3731671ae10..c4bebbfd7cca 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -355,7 +355,7 @@ void ONthOperator::Exec(OCodeStack& rCodeStack)
rCodeStack.push(new OOperandResult(operate(aValues)));
- for (auto& rpOperand : aOperands)
+ for (const auto& rpOperand : aOperands)
{
if (typeid(OOperandResult) == typeid(*rpOperand))
delete rpOperand;
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index e76ef27cc59d..e7811fdac811 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -109,7 +109,7 @@ namespace connectivity
try
{
- for (auto& rConnection : m_aConnections)
+ for (const auto& rConnection : m_aConnections)
{
Reference<XInterface > xTemp = rConnection.first.get();
::comphelper::disposeComponent(xTemp);
@@ -580,7 +580,7 @@ namespace connectivity
void ODriverDelegator::shutdownConnections()
{
m_bInShutDownConnections = true;
- for (auto& rConnection : m_aConnections)
+ for (const auto& rConnection : m_aConnections)
{
try
{
@@ -597,7 +597,7 @@ namespace connectivity
void ODriverDelegator::flushConnections()
{
- for (auto& rConnection : m_aConnections)
+ for (const auto& rConnection : m_aConnections)
{
try
{
diff --git a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
index b2810d3612dc..490688df3c91 100644
--- a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
@@ -101,7 +101,7 @@ ODatabaseMetaDataResultSet::ORows ODatabaseMetaData::getColumnRows(
aRow[18] = new ORowSetValueDecorator(OUString("YES"));
// Iterate over all tables
- for(OUString & table : tables) {
+ for(const OUString & table : tables) {
if(match(tableNamePattern, table,'\0')) {
// TABLE_NAME
aRow[3] = new ORowSetValueDecorator( table );
@@ -923,7 +923,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
// Iterate over all tables
- for(OUString & table : tables) {
+ for(const OUString & table : tables) {
if(match(tableNamePattern, table,'\0'))
{
// TABLE_NAME
diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
index 13fbcdf03579..82f26a3be1b0 100644
--- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
@@ -168,7 +168,7 @@ PreparedStatement::PreparedStatement(
splitSQL( m_stmt, m_splittedStatement );
int elements = 0;
- for(OString & str : m_splittedStatement)
+ for(const OString & str : m_splittedStatement)
{
// ignore quoted strings ....
if( ! isQuoted( str ) )
@@ -298,7 +298,7 @@ sal_Bool PreparedStatement::execute( )
OStringBuffer buf( m_stmt.getLength() *2 );
std::vector< OString >::size_type vars = 0;
- for(OString & str : m_splittedStatement)
+ for(const OString & str : m_splittedStatement)
{
// LEM TODO: instead of this manual mucking with SQL
// could we use PQexecParams / PQExecPrepared / ...?
diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
index a7fb2f791260..7bf0d4fd625d 100644
--- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
@@ -212,7 +212,7 @@ void UpdateableResultSet::insertRow( )
buf.append( " ) VALUES ( " );
columns = 0;
- for(UpdateableField & i : m_updateableField)
+ for(const UpdateableField & i : m_updateableField)
{
if( i.isTouched )
{