summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-28 11:47:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-28 14:51:56 +0200
commitb09deb075319c1c19f91e3a6f64429b61682ebf8 (patch)
tree9e73d1e63092083a337a4ddf1dfe962b4f6ef4dc /connectivity
parent587d6e13df7bb9c8f78ce605ebb8f8fd34b85a2c (diff)
loplugin:constparams handle constructors
had to change the structure of the plugin considerably, was too messy to structure it to do the calculations on a per-function basis Change-Id: I4edee7735f726101105c607368124a08dba21086 Reviewed-on: https://gerrit.libreoffice.org/40516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/file/fcode.cxx2
-rw-r--r--connectivity/source/drivers/file/fcomp.cxx4
-rw-r--r--connectivity/source/drivers/firebird/Blob.cxx2
-rw-r--r--connectivity/source/drivers/firebird/Blob.hxx2
-rw-r--r--connectivity/source/drivers/firebird/Clob.cxx2
-rw-r--r--connectivity/source/drivers/firebird/Clob.hxx2
-rw-r--r--connectivity/source/drivers/firebird/Connection.cxx4
-rw-r--r--connectivity/source/drivers/firebird/Connection.hxx4
-rw-r--r--connectivity/source/drivers/firebird/Tables.hxx2
-rw-r--r--connectivity/source/drivers/firebird/Users.cxx2
-rw-r--r--connectivity/source/drivers/firebird/Users.hxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx2
-rw-r--r--connectivity/source/inc/file/fcode.hxx2
-rw-r--r--connectivity/source/inc/file/fcomp.hxx4
15 files changed, 19 insertions, 19 deletions
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index 69b1692735eb..6e3e29450fef 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -65,7 +65,7 @@ void OOperandValue::setValue(const ORowSetValue& _rVal)
m_aValue = _rVal;
}
-OOperandParam::OOperandParam(OSQLParseNode* pNode, sal_Int32 _nPos)
+OOperandParam::OOperandParam(OSQLParseNode const * pNode, sal_Int32 _nPos)
: OOperandRow(static_cast<sal_uInt16>(_nPos), DataType::VARCHAR) // Standard-Type
{
OSL_ENSURE(SQL_ISRULE(pNode,parameter),"Argument is not a parameter");
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index d922a5293022..1953fb5303a6 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -134,7 +134,7 @@ void OPredicateCompiler::start(OSQLParseNode const * pSQLParseNode)
}
-OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode)
+OOperand* OPredicateCompiler::execute(OSQLParseNode const * pPredicateNode)
{
OOperand* pOperand = nullptr;
if (pPredicateNode->count() == 3 && // Expression is bracketed
@@ -408,7 +408,7 @@ void OPredicateCompiler::execute_ISNULL(OSQLParseNode const * pPredicateNode)
m_aCodeList.push_back(pOperator);
}
-OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode)
+OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode const * pPredicateNode)
{
OOperand* pOperand = nullptr;
diff --git a/connectivity/source/drivers/firebird/Blob.cxx b/connectivity/source/drivers/firebird/Blob.cxx
index be4922d7f33c..b71c8844cb72 100644
--- a/connectivity/source/drivers/firebird/Blob.cxx
+++ b/connectivity/source/drivers/firebird/Blob.cxx
@@ -31,7 +31,7 @@ using namespace ::com::sun::star::uno;
Blob::Blob(isc_db_handle* pDatabaseHandle,
isc_tr_handle* pTransactionHandle,
- ISC_QUAD& aBlobID):
+ ISC_QUAD const & aBlobID):
Blob_BASE(m_aMutex),
m_pDatabaseHandle(pDatabaseHandle),
m_pTransactionHandle(pTransactionHandle),
diff --git a/connectivity/source/drivers/firebird/Blob.hxx b/connectivity/source/drivers/firebird/Blob.hxx
index eb8e282bf911..9afa09dec8fd 100644
--- a/connectivity/source/drivers/firebird/Blob.hxx
+++ b/connectivity/source/drivers/firebird/Blob.hxx
@@ -58,7 +58,7 @@ namespace connectivity
public:
Blob(isc_db_handle* pDatabaseHandle,
isc_tr_handle* pTransactionHandle,
- ISC_QUAD& aBlobID);
+ ISC_QUAD const & aBlobID);
// ---- XBlob ----------------------------------------------------
virtual sal_Int64 SAL_CALL
diff --git a/connectivity/source/drivers/firebird/Clob.cxx b/connectivity/source/drivers/firebird/Clob.cxx
index 4f70a000a242..7e2d49727ed1 100644
--- a/connectivity/source/drivers/firebird/Clob.cxx
+++ b/connectivity/source/drivers/firebird/Clob.cxx
@@ -26,7 +26,7 @@ using namespace ::com::sun::star::uno;
Clob::Clob(isc_db_handle* pDatabaseHandle,
isc_tr_handle* pTransactionHandle,
- ISC_QUAD& aBlobID):
+ ISC_QUAD const & aBlobID):
Clob_BASE(m_aMutex),
m_aBlob(new connectivity::firebird::Blob(pDatabaseHandle, pTransactionHandle, aBlobID))
{
diff --git a/connectivity/source/drivers/firebird/Clob.hxx b/connectivity/source/drivers/firebird/Clob.hxx
index b71bec19fa51..d435312f9f36 100644
--- a/connectivity/source/drivers/firebird/Clob.hxx
+++ b/connectivity/source/drivers/firebird/Clob.hxx
@@ -41,7 +41,7 @@ namespace connectivity
public:
Clob(isc_db_handle* pDatabaseHandle,
isc_tr_handle* pTransactionHandle,
- ISC_QUAD& aBlobID);
+ ISC_QUAD const & aBlobID);
// ---- XClob ----------------------------------------------------
virtual sal_Int64 SAL_CALL
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx
index f6807cf2bbe1..d792ecb72fb0 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -349,7 +349,7 @@ void Connection::notifyDatabaseModified()
IMPLEMENT_SERVICE_INFO(Connection, "com.sun.star.sdbc.drivers.firebird.Connection",
"com.sun.star.sdbc.Connection")
-Reference< XBlob> Connection::createBlob(ISC_QUAD* pBlobId)
+Reference< XBlob> Connection::createBlob(ISC_QUAD const * pBlobId)
{
MutexGuard aGuard(m_aMutex);
checkDisposed(Connection_BASE::rBHelper.bDisposed);
@@ -362,7 +362,7 @@ Reference< XBlob> Connection::createBlob(ISC_QUAD* pBlobId)
return xReturn;
}
-Reference< XClob> Connection::createClob(ISC_QUAD* pBlobId)
+Reference< XClob> Connection::createClob(ISC_QUAD const * pBlobId)
{
MutexGuard aGuard(m_aMutex);
checkDisposed(Connection_BASE::rBHelper.bDisposed);
diff --git a/connectivity/source/drivers/firebird/Connection.hxx b/connectivity/source/drivers/firebird/Connection.hxx
index 43bccf9ab8f8..70f5a417af42 100644
--- a/connectivity/source/drivers/firebird/Connection.hxx
+++ b/connectivity/source/drivers/firebird/Connection.hxx
@@ -211,11 +211,11 @@ namespace connectivity
* @throws css::uno::RuntimeException
*/
css::uno::Reference< css::sdbc::XBlob>
- createBlob(ISC_QUAD* pBlobID);
+ createBlob(ISC_QUAD const * pBlobID);
/// @throws css::sdbc::SQLException
/// @throws css::uno::RuntimeException
css::uno::Reference< css::sdbc::XClob>
- createClob(ISC_QUAD* pBlobID);
+ createClob(ISC_QUAD const * pBlobID);
/**
* Create and/or connect to the sdbcx Catalog. This is completely
diff --git a/connectivity/source/drivers/firebird/Tables.hxx b/connectivity/source/drivers/firebird/Tables.hxx
index e106b8b65c4d..d391ca8b0999 100644
--- a/connectivity/source/drivers/firebird/Tables.hxx
+++ b/connectivity/source/drivers/firebird/Tables.hxx
@@ -45,7 +45,7 @@ namespace connectivity
Tables(const css::uno::Reference< css::sdbc::XDatabaseMetaData >& rMetaData,
::cppu::OWeakObject& rParent,
::osl::Mutex& rMutex,
- ::connectivity::TStringVector& rNames) : sdbcx::OCollection(rParent, true, rMutex, rNames), m_xMetaData(rMetaData) {}
+ ::connectivity::TStringVector const & rNames) : sdbcx::OCollection(rParent, true, rMutex, rNames), m_xMetaData(rMetaData) {}
// TODO: we should also implement XDataDescriptorFactory, XRefreshable,
// XAppend, etc., but all are optional.
diff --git a/connectivity/source/drivers/firebird/Users.cxx b/connectivity/source/drivers/firebird/Users.cxx
index a887a679e7e8..edaa9edb6862 100644
--- a/connectivity/source/drivers/firebird/Users.cxx
+++ b/connectivity/source/drivers/firebird/Users.cxx
@@ -30,7 +30,7 @@ using namespace ::com::sun::star::uno;
Users::Users(const uno::Reference< XDatabaseMetaData >& rMetaData,
OWeakObject& rParent,
Mutex& rMutex,
- TStringVector& rNames) :
+ TStringVector const & rNames) :
OCollection(rParent,
true,
rMutex,
diff --git a/connectivity/source/drivers/firebird/Users.hxx b/connectivity/source/drivers/firebird/Users.hxx
index 75ba14499eb5..a689e672b5bc 100644
--- a/connectivity/source/drivers/firebird/Users.hxx
+++ b/connectivity/source/drivers/firebird/Users.hxx
@@ -42,7 +42,7 @@ namespace connectivity
Users(const css::uno::Reference< css::sdbc::XDatabaseMetaData >& rMetaData,
::cppu::OWeakObject& rParent,
::osl::Mutex& rMutex,
- ::connectivity::TStringVector& rNames);
+ ::connectivity::TStringVector const & rNames);
// TODO: we should also implement XDataDescriptorFactory, XRefreshable,
// XAppend, etc., but all are optional.
diff --git a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx
index 6b46bd2f5654..06341803ba2b 100644
--- a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx
@@ -117,7 +117,7 @@ ResultSetMetaData::ResultSetMetaData(
const css::uno::Reference< css::sdbc::XResultSet > & origin,
ResultSet * pResultSet,
ConnectionSettings **ppSettings,
- PGresult *pResult,
+ PGresult const *pResult,
const OUString &schemaName,
const OUString &tableName ) :
m_xMutex( refMutex ),
diff --git a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx
index 1beede2b835d..2c1b5e5e5965 100644
--- a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx
+++ b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx
@@ -94,7 +94,7 @@ public:
const css::uno::Reference< css::sdbc::XResultSet > & origin,
ResultSet *pResultSet,
ConnectionSettings **pSettings,
- PGresult *pResult,
+ PGresult const *pResult,
const OUString &schemaName,
const OUString &tableName );
diff --git a/connectivity/source/inc/file/fcode.hxx b/connectivity/source/inc/file/fcode.hxx
index 8ac3676b26d0..40e0a1100c95 100644
--- a/connectivity/source/inc/file/fcode.hxx
+++ b/connectivity/source/inc/file/fcode.hxx
@@ -110,7 +110,7 @@ namespace connectivity
class OOperandParam : public OOperandRow
{
public:
- OOperandParam(connectivity::OSQLParseNode* pNode, sal_Int32 _nPos);
+ OOperandParam(connectivity::OSQLParseNode const * pNode, sal_Int32 _nPos);
};
// Value operands
diff --git a/connectivity/source/inc/file/fcomp.hxx b/connectivity/source/inc/file/fcomp.hxx
index 0e8606002e6c..a20ce876fe03 100644
--- a/connectivity/source/inc/file/fcomp.hxx
+++ b/connectivity/source/inc/file/fcomp.hxx
@@ -59,7 +59,7 @@ namespace connectivity
void dispose();
void start(connectivity::OSQLParseNode const * pSQLParseNode);
- OOperand* execute(connectivity::OSQLParseNode* pPredicateNode);
+ OOperand* execute(connectivity::OSQLParseNode const * pPredicateNode);
void Clean();
bool isClean() const {return m_aCodeList.empty();}
@@ -81,7 +81,7 @@ namespace connectivity
void execute_ISNULL(connectivity::OSQLParseNode const * pPredicateNode);
/// @throws css::sdbc::SQLException
/// @throws css::uno::RuntimeException
- OOperand* execute_Operand(connectivity::OSQLParseNode* pPredicateNode);
+ OOperand* execute_Operand(connectivity::OSQLParseNode const * pPredicateNode);
/// @throws css::sdbc::SQLException
/// @throws css::uno::RuntimeException
void execute_Fold(OSQLParseNode const * pPredicateNode);