From 1ddbbfdda834965c861a67e275ab58ff4d1f0bf9 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 10 Nov 2015 10:19:59 +0100 Subject: loplugin:nullptr (automatic rewrite) Change-Id: Ie77375d781164232ea0cd94c3d2a5d027c49669e --- mysqlc/source/mysqlc_connection.cxx | 2 +- mysqlc/source/mysqlc_databasemetadata.cxx | 4 ++-- mysqlc/source/mysqlc_driver.cxx | 8 ++++---- mysqlc/source/mysqlc_general.hxx | 4 ++-- mysqlc/source/mysqlc_resultset.cxx | 18 +++++++++--------- mysqlc/source/mysqlc_services.cxx | 4 ++-- mysqlc/source/mysqlc_statement.cxx | 4 ++-- mysqlc/source/mysqlc_subcomponent.hxx | 4 ++-- mysqlc/source/mysqlc_types.cxx | 2 +- 9 files changed, 25 insertions(+), 25 deletions(-) (limited to 'mysqlc/source') diff --git a/mysqlc/source/mysqlc_connection.cxx b/mysqlc/source/mysqlc_connection.cxx index e0b0425871ce..5c3fd7c2cb59 100644 --- a/mysqlc/source/mysqlc_connection.cxx +++ b/mysqlc/source/mysqlc_connection.cxx @@ -63,7 +63,7 @@ using ::osl::MutexGuard; OConnection::OConnection(MysqlCDriver& _rDriver, sql::Driver * _cppDriver) :OMetaConnection_BASE(m_aMutex) ,OSubComponent(static_cast(&_rDriver), this) - ,m_xMetaData(NULL) + ,m_xMetaData(nullptr) ,m_rDriver(_rDriver) ,cppDriver(_cppDriver) ,m_bClosed(false) diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx b/mysqlc/source/mysqlc_databasemetadata.cxx index 39abb7f0829e..f7a49cfbe79c 100644 --- a/mysqlc/source/mysqlc_databasemetadata.cxx +++ b/mysqlc/source/mysqlc_databasemetadata.cxx @@ -1351,7 +1351,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns( { OSL_TRACE("ODatabaseMetaData::getProcedureColumns"); // Currently there is no information available - return NULL; + return nullptr; } Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures( @@ -1715,7 +1715,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( { OSL_TRACE("ODatabaseMetaData::getUDTs"); mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getUDTs", *this); - return NULL; + return nullptr; } /* diff --git a/mysqlc/source/mysqlc_driver.cxx b/mysqlc/source/mysqlc_driver.cxx index 399d6228eecb..3a31685d9c2e 100644 --- a/mysqlc/source/mysqlc_driver.cxx +++ b/mysqlc/source/mysqlc_driver.cxx @@ -45,12 +45,12 @@ MysqlCDriver::MysqlCDriver(const Reference< XMultiServiceFactory >& _rxFactory) : ODriver_BASE(m_aMutex) ,m_xFactory(_rxFactory) #ifndef SYSTEM_MYSQL_CPPCONN - ,m_hCppConnModule( NULL ) + ,m_hCppConnModule( nullptr ) ,m_bAttemptedLoadCppConn( false ) #endif { OSL_TRACE("MysqlCDriver::MysqlCDriver"); - cppDriver = NULL; + cppDriver = nullptr; } void MysqlCDriver::disposing() @@ -198,7 +198,7 @@ Reference< XConnection > SAL_CALL MysqlCDriver::connect(const rtl::OUString& url OSL_TRACE("MysqlCDriver::connect"); if (!acceptsURL(url)) { - return NULL; + return nullptr; } if ( !cppDriver ) @@ -297,7 +297,7 @@ void release(oslInterlockedCount& _refCount, { ::osl::MutexGuard aGuard(rBHelper.rMutex); xParent = _xInterface; - _xInterface = NULL; + _xInterface = nullptr; } // First dispose diff --git a/mysqlc/source/mysqlc_general.hxx b/mysqlc/source/mysqlc_general.hxx index 83318944a047..d0a9c27de440 100644 --- a/mysqlc/source/mysqlc_general.hxx +++ b/mysqlc/source/mysqlc_general.hxx @@ -34,14 +34,14 @@ namespace mysqlc_sdbc_driver void throwFeatureNotImplementedException( const sal_Char* _pAsciiFeatureName, const css::uno::Reference< css::uno::XInterface >& _rxContext, - const css::uno::Any* _pNextException = NULL + const css::uno::Any* _pNextException = nullptr ) throw (css::sdbc::SQLException); void throwInvalidArgumentException( const sal_Char* _pAsciiFeatureName, const css::uno::Reference< css::uno::XInterface >& _rxContext, - const css::uno::Any* _pNextException = NULL + const css::uno::Any* _pNextException = nullptr ) throw (css::sdbc::SQLException); diff --git a/mysqlc/source/mysqlc_resultset.cxx b/mysqlc/source/mysqlc_resultset.cxx index c371bbced9c1..6f8236e5aba6 100644 --- a/mysqlc/source/mysqlc_resultset.cxx +++ b/mysqlc/source/mysqlc_resultset.cxx @@ -76,7 +76,7 @@ OResultSet::OResultSet(OCommonStatement * pStmt, sql::ResultSet * result, rtl_Te : OResultSet_BASE(m_aMutex) ,OPropertySetHelper(OResultSet_BASE::rBHelper) ,m_aStatement(static_cast(pStmt)) - ,m_xMetaData(NULL) + ,m_xMetaData(nullptr) ,m_result(result) ,fieldCount( 0 ) ,m_encoding( _encoding ) @@ -102,8 +102,8 @@ void OResultSet::disposing() MutexGuard aGuard(m_aMutex); - m_aStatement = NULL; - m_xMetaData = NULL; + m_aStatement = nullptr; + m_xMetaData = nullptr; } Any SAL_CALL OResultSet::queryInterface(const Type & rType) @@ -165,7 +165,7 @@ Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream(sal_Int32 column) checkColumnIndex(column); mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getBinaryStream", *this); - return NULL; + return nullptr; } Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream(sal_Int32 column) @@ -177,7 +177,7 @@ Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream(sal_Int32 colu checkColumnIndex(column); mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getCharacterStream", *this); - return NULL; + return nullptr; } sal_Bool SAL_CALL OResultSet::getBoolean(sal_Int32 column) @@ -370,7 +370,7 @@ Reference< XArray > SAL_CALL OResultSet::getArray(sal_Int32 column) checkColumnIndex(column); mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getArray", *this); - return NULL; + return nullptr; } Reference< XClob > SAL_CALL OResultSet::getClob(sal_Int32 column) @@ -382,7 +382,7 @@ Reference< XClob > SAL_CALL OResultSet::getClob(sal_Int32 column) checkColumnIndex(column); mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getClob", *this); - return NULL; + return nullptr; } Reference< XBlob > SAL_CALL OResultSet::getBlob(sal_Int32 column) @@ -394,7 +394,7 @@ Reference< XBlob > SAL_CALL OResultSet::getBlob(sal_Int32 column) checkColumnIndex(column); mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getBlob", *this); - return NULL; + return nullptr; } Reference< XRef > SAL_CALL OResultSet::getRef(sal_Int32 column) @@ -406,7 +406,7 @@ Reference< XRef > SAL_CALL OResultSet::getRef(sal_Int32 column) checkColumnIndex(column); mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getRef", *this); - return NULL; + return nullptr; } Any SAL_CALL OResultSet::getObject(sal_Int32 column, const Reference< XNameAccess >& /* typeMap */) diff --git a/mysqlc/source/mysqlc_services.cxx b/mysqlc/source/mysqlc_services.cxx index 1671b87772c3..66ae887cda83 100644 --- a/mysqlc/source/mysqlc_services.cxx +++ b/mysqlc/source/mysqlc_services.cxx @@ -63,7 +63,7 @@ struct ProviderRequest { if (!xRet.is() && (Implname == sImplementationName)) { try { - xRet = creator( xServiceManager, sImplementationName,Factory, Services,0); + xRet = creator( xServiceManager, sImplementationName,Factory, Services,nullptr); } catch (...) { } } @@ -78,7 +78,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( void * pServiceManager, void * /* pRegistryKey */) { - void* pRet = 0; + void* pRet = nullptr; if (pServiceManager) { ProviderRequest aReq(pServiceManager,pImplementationName); diff --git a/mysqlc/source/mysqlc_statement.cxx b/mysqlc/source/mysqlc_statement.cxx index 56a9859073c5..859f7a929a82 100644 --- a/mysqlc/source/mysqlc_statement.cxx +++ b/mysqlc/source/mysqlc_statement.cxx @@ -75,7 +75,7 @@ void OCommonStatement::disposeResultSet() OSL_TRACE("OCommonStatement::disposeResultSet"); // free the cursor if alive delete cppStatement; - cppStatement = NULL; + cppStatement = nullptr; } void OCommonStatement::disposing() @@ -87,7 +87,7 @@ void OCommonStatement::disposing() if (m_pConnection) { m_pConnection->release(); - m_pConnection = NULL; + m_pConnection = nullptr; } delete cppStatement; diff --git a/mysqlc/source/mysqlc_subcomponent.hxx b/mysqlc/source/mysqlc_subcomponent.hxx index e052bf85490f..92bb81564108 100644 --- a/mysqlc/source/mysqlc_subcomponent.hxx +++ b/mysqlc/source/mysqlc_subcomponent.hxx @@ -108,7 +108,7 @@ namespace connectivity if (!--s_nRefCount) { delete s_pProps; - s_pProps = NULL; + s_pProps = nullptr; } } @@ -134,7 +134,7 @@ namespace connectivity sal_Int32 OPropertyArrayUsageHelper< TYPE >::s_nRefCount = 0; template - ::cppu::IPropertyArrayHelper* OPropertyArrayUsageHelper< TYPE >::s_pProps = NULL; + ::cppu::IPropertyArrayHelper* OPropertyArrayUsageHelper< TYPE >::s_pProps = nullptr; template ::osl::Mutex OPropertyArrayUsageHelper< TYPE >::s_aMutex; diff --git a/mysqlc/source/mysqlc_types.cxx b/mysqlc/source/mysqlc_types.cxx index 812c817c9a5c..6c2849a7837f 100644 --- a/mysqlc/source/mysqlc_types.cxx +++ b/mysqlc/source/mysqlc_types.cxx @@ -777,7 +777,7 @@ TypeInfoDef mysqlc_types[] = { // ----------- MySQL-Type: TIMESTAMP SDBC-Type: TIMESTAMP ---------- { - 0, 0, 0, 0, 0, 0, 0, false, 0, false, false, false, 0, 0, 0, 0, 0, 0 + nullptr, 0, 0, nullptr, nullptr, nullptr, 0, false, 0, false, false, false, nullptr, 0, 0, 0, 0, 0 } }; -- cgit v1.2.3