Kaydet (Commit) 3fecccad authored tarafından Michael Stahl's avatar Michael Stahl

connecitivty: [loplugin:nullptr]

Change-Id: Ic717e1d119e1a5b8a87caca263322d9e58fe6c68
üst 8ad0fb82
...@@ -33,7 +33,11 @@ Blob::Blob(isc_db_handle* pDatabaseHandle, ...@@ -33,7 +33,11 @@ Blob::Blob(isc_db_handle* pDatabaseHandle,
m_pDatabaseHandle(pDatabaseHandle), m_pDatabaseHandle(pDatabaseHandle),
m_pTransactionHandle(pTransactionHandle), m_pTransactionHandle(pTransactionHandle),
m_blobID(aBlobID), m_blobID(aBlobID),
#if SAL_TYPES_SIZEOFPOINTER == 8
m_blobHandle(0), m_blobHandle(0),
#else
m_blobHandle(nullptr),
#endif
m_bBlobOpened(false), m_bBlobOpened(false),
m_nBlobLength(0), m_nBlobLength(0),
m_nBlobPosition(0) m_nBlobPosition(0)
...@@ -103,7 +107,11 @@ void Blob::closeBlob() ...@@ -103,7 +107,11 @@ void Blob::closeBlob()
evaluateStatusVector(m_statusVector, "isc_close_blob", *this); evaluateStatusVector(m_statusVector, "isc_close_blob", *this);
m_bBlobOpened = false; m_bBlobOpened = false;
#if SAL_TYPES_SIZEOFPOINTER == 8
m_blobHandle = 0; m_blobHandle = 0;
#else
m_blobHandle = nullptr;
#endif
} }
} }
......
...@@ -89,8 +89,13 @@ Connection::Connection(FirebirdDriver* _pDriver) ...@@ -89,8 +89,13 @@ Connection::Connection(FirebirdDriver* _pDriver)
, m_bIsAutoCommit(false) , m_bIsAutoCommit(false)
, m_bIsReadOnly(false) , m_bIsReadOnly(false)
, m_aTransactionIsolation(TransactionIsolation::REPEATABLE_READ) , m_aTransactionIsolation(TransactionIsolation::REPEATABLE_READ)
#if SAL_TYPES_SIZEOFPOINTER == 8
, m_aDBHandle(0) , m_aDBHandle(0)
, m_aTransactionHandle(0) , m_aTransactionHandle(0)
#else
, m_aDBHandle(nullptr)
, m_aTransactionHandle(nullptr)
#endif
, m_xCatalog(nullptr) , m_xCatalog(nullptr)
, m_xMetaData(nullptr) , m_xMetaData(nullptr)
, m_aStatements() , m_aStatements()
...@@ -773,7 +778,7 @@ void Connection::disposing() ...@@ -773,7 +778,7 @@ void Connection::disposing()
isc_rollback_transaction(status, &m_aTransactionHandle); isc_rollback_transaction(status, &m_aTransactionHandle);
} }
if (m_aDBHandle != 0) if (m_aDBHandle)
{ {
if (isc_detach_database(status, &m_aDBHandle)) if (isc_detach_database(status, &m_aDBHandle))
{ {
......
...@@ -485,7 +485,11 @@ void SAL_CALL OPreparedStatement::setBlob(sal_Int32 nParameterIndex, ...@@ -485,7 +485,11 @@ void SAL_CALL OPreparedStatement::setBlob(sal_Int32 nParameterIndex,
::osl::MutexGuard aGuard(m_aMutex); ::osl::MutexGuard aGuard(m_aMutex);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed); checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
#if SAL_TYPES_SIZEOFPOINTER == 8
isc_blob_handle aBlobHandle = 0; isc_blob_handle aBlobHandle = 0;
#else
isc_blob_handle aBlobHandle = nullptr;
#endif
ISC_QUAD aBlobId; ISC_QUAD aBlobId;
openBlobForWriting(aBlobHandle, aBlobId); openBlobForWriting(aBlobHandle, aBlobId);
...@@ -585,7 +589,11 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex, ...@@ -585,7 +589,11 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex,
::osl::MutexGuard aGuard(m_aMutex); ::osl::MutexGuard aGuard(m_aMutex);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed); checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
#if SAL_TYPES_SIZEOFPOINTER == 8
isc_blob_handle aBlobHandle = 0; isc_blob_handle aBlobHandle = 0;
#else
isc_blob_handle aBlobHandle = nullptr;
#endif
ISC_QUAD aBlobId; ISC_QUAD aBlobId;
openBlobForWriting(aBlobHandle, aBlobId); openBlobForWriting(aBlobHandle, aBlobId);
......
...@@ -47,7 +47,11 @@ OStatementCommonBase::OStatementCommonBase(Connection* _pConnection) ...@@ -47,7 +47,11 @@ OStatementCommonBase::OStatementCommonBase(Connection* _pConnection)
: OStatementCommonBase_Base(m_aMutex), : OStatementCommonBase_Base(m_aMutex),
OPropertySetHelper(OStatementCommonBase_Base::rBHelper), OPropertySetHelper(OStatementCommonBase_Base::rBHelper),
m_pConnection(_pConnection), m_pConnection(_pConnection),
m_aStatementHandle( 0 ) #if SAL_TYPES_SIZEOFPOINTER == 8
m_aStatementHandle(0)
#else
m_aStatementHandle(nullptr)
#endif
{ {
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment