Kaydet (Commit) 1ddbbfdd authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:nullptr (automatic rewrite)

Change-Id: Ie77375d781164232ea0cd94c3d2a5d027c49669e
üst 822a0b70
...@@ -63,7 +63,7 @@ using ::osl::MutexGuard; ...@@ -63,7 +63,7 @@ using ::osl::MutexGuard;
OConnection::OConnection(MysqlCDriver& _rDriver, sql::Driver * _cppDriver) OConnection::OConnection(MysqlCDriver& _rDriver, sql::Driver * _cppDriver)
:OMetaConnection_BASE(m_aMutex) :OMetaConnection_BASE(m_aMutex)
,OSubComponent<OConnection, OConnection_BASE>(static_cast<cppu::OWeakObject*>(&_rDriver), this) ,OSubComponent<OConnection, OConnection_BASE>(static_cast<cppu::OWeakObject*>(&_rDriver), this)
,m_xMetaData(NULL) ,m_xMetaData(nullptr)
,m_rDriver(_rDriver) ,m_rDriver(_rDriver)
,cppDriver(_cppDriver) ,cppDriver(_cppDriver)
,m_bClosed(false) ,m_bClosed(false)
......
...@@ -1351,7 +1351,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns( ...@@ -1351,7 +1351,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns(
{ {
OSL_TRACE("ODatabaseMetaData::getProcedureColumns"); OSL_TRACE("ODatabaseMetaData::getProcedureColumns");
// Currently there is no information available // Currently there is no information available
return NULL; return nullptr;
} }
Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures( Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures(
...@@ -1715,7 +1715,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( ...@@ -1715,7 +1715,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs(
{ {
OSL_TRACE("ODatabaseMetaData::getUDTs"); OSL_TRACE("ODatabaseMetaData::getUDTs");
mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getUDTs", *this); mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::getUDTs", *this);
return NULL; return nullptr;
} }
/* /*
......
...@@ -45,12 +45,12 @@ MysqlCDriver::MysqlCDriver(const Reference< XMultiServiceFactory >& _rxFactory) ...@@ -45,12 +45,12 @@ MysqlCDriver::MysqlCDriver(const Reference< XMultiServiceFactory >& _rxFactory)
: ODriver_BASE(m_aMutex) : ODriver_BASE(m_aMutex)
,m_xFactory(_rxFactory) ,m_xFactory(_rxFactory)
#ifndef SYSTEM_MYSQL_CPPCONN #ifndef SYSTEM_MYSQL_CPPCONN
,m_hCppConnModule( NULL ) ,m_hCppConnModule( nullptr )
,m_bAttemptedLoadCppConn( false ) ,m_bAttemptedLoadCppConn( false )
#endif #endif
{ {
OSL_TRACE("MysqlCDriver::MysqlCDriver"); OSL_TRACE("MysqlCDriver::MysqlCDriver");
cppDriver = NULL; cppDriver = nullptr;
} }
void MysqlCDriver::disposing() void MysqlCDriver::disposing()
...@@ -198,7 +198,7 @@ Reference< XConnection > SAL_CALL MysqlCDriver::connect(const rtl::OUString& url ...@@ -198,7 +198,7 @@ Reference< XConnection > SAL_CALL MysqlCDriver::connect(const rtl::OUString& url
OSL_TRACE("MysqlCDriver::connect"); OSL_TRACE("MysqlCDriver::connect");
if (!acceptsURL(url)) { if (!acceptsURL(url)) {
return NULL; return nullptr;
} }
if ( !cppDriver ) if ( !cppDriver )
...@@ -297,7 +297,7 @@ void release(oslInterlockedCount& _refCount, ...@@ -297,7 +297,7 @@ void release(oslInterlockedCount& _refCount,
{ {
::osl::MutexGuard aGuard(rBHelper.rMutex); ::osl::MutexGuard aGuard(rBHelper.rMutex);
xParent = _xInterface; xParent = _xInterface;
_xInterface = NULL; _xInterface = nullptr;
} }
// First dispose // First dispose
......
...@@ -34,14 +34,14 @@ namespace mysqlc_sdbc_driver ...@@ -34,14 +34,14 @@ namespace mysqlc_sdbc_driver
void throwFeatureNotImplementedException( void throwFeatureNotImplementedException(
const sal_Char* _pAsciiFeatureName, const sal_Char* _pAsciiFeatureName,
const css::uno::Reference< css::uno::XInterface >& _rxContext, const css::uno::Reference< css::uno::XInterface >& _rxContext,
const css::uno::Any* _pNextException = NULL const css::uno::Any* _pNextException = nullptr
) )
throw (css::sdbc::SQLException); throw (css::sdbc::SQLException);
void throwInvalidArgumentException( void throwInvalidArgumentException(
const sal_Char* _pAsciiFeatureName, const sal_Char* _pAsciiFeatureName,
const css::uno::Reference< css::uno::XInterface >& _rxContext, const css::uno::Reference< css::uno::XInterface >& _rxContext,
const css::uno::Any* _pNextException = NULL const css::uno::Any* _pNextException = nullptr
) )
throw (css::sdbc::SQLException); throw (css::sdbc::SQLException);
......
...@@ -76,7 +76,7 @@ OResultSet::OResultSet(OCommonStatement * pStmt, sql::ResultSet * result, rtl_Te ...@@ -76,7 +76,7 @@ OResultSet::OResultSet(OCommonStatement * pStmt, sql::ResultSet * result, rtl_Te
: OResultSet_BASE(m_aMutex) : OResultSet_BASE(m_aMutex)
,OPropertySetHelper(OResultSet_BASE::rBHelper) ,OPropertySetHelper(OResultSet_BASE::rBHelper)
,m_aStatement(static_cast<OWeakObject*>(pStmt)) ,m_aStatement(static_cast<OWeakObject*>(pStmt))
,m_xMetaData(NULL) ,m_xMetaData(nullptr)
,m_result(result) ,m_result(result)
,fieldCount( 0 ) ,fieldCount( 0 )
,m_encoding( _encoding ) ,m_encoding( _encoding )
...@@ -102,8 +102,8 @@ void OResultSet::disposing() ...@@ -102,8 +102,8 @@ void OResultSet::disposing()
MutexGuard aGuard(m_aMutex); MutexGuard aGuard(m_aMutex);
m_aStatement = NULL; m_aStatement = nullptr;
m_xMetaData = NULL; m_xMetaData = nullptr;
} }
Any SAL_CALL OResultSet::queryInterface(const Type & rType) Any SAL_CALL OResultSet::queryInterface(const Type & rType)
...@@ -165,7 +165,7 @@ Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream(sal_Int32 column) ...@@ -165,7 +165,7 @@ Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream(sal_Int32 column)
checkColumnIndex(column); checkColumnIndex(column);
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getBinaryStream", *this); mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getBinaryStream", *this);
return NULL; return nullptr;
} }
Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream(sal_Int32 column) Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream(sal_Int32 column)
...@@ -177,7 +177,7 @@ Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream(sal_Int32 colu ...@@ -177,7 +177,7 @@ Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream(sal_Int32 colu
checkColumnIndex(column); checkColumnIndex(column);
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getCharacterStream", *this); mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getCharacterStream", *this);
return NULL; return nullptr;
} }
sal_Bool SAL_CALL OResultSet::getBoolean(sal_Int32 column) sal_Bool SAL_CALL OResultSet::getBoolean(sal_Int32 column)
...@@ -370,7 +370,7 @@ Reference< XArray > SAL_CALL OResultSet::getArray(sal_Int32 column) ...@@ -370,7 +370,7 @@ Reference< XArray > SAL_CALL OResultSet::getArray(sal_Int32 column)
checkColumnIndex(column); checkColumnIndex(column);
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getArray", *this); mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getArray", *this);
return NULL; return nullptr;
} }
Reference< XClob > SAL_CALL OResultSet::getClob(sal_Int32 column) Reference< XClob > SAL_CALL OResultSet::getClob(sal_Int32 column)
...@@ -382,7 +382,7 @@ Reference< XClob > SAL_CALL OResultSet::getClob(sal_Int32 column) ...@@ -382,7 +382,7 @@ Reference< XClob > SAL_CALL OResultSet::getClob(sal_Int32 column)
checkColumnIndex(column); checkColumnIndex(column);
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getClob", *this); mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getClob", *this);
return NULL; return nullptr;
} }
Reference< XBlob > SAL_CALL OResultSet::getBlob(sal_Int32 column) Reference< XBlob > SAL_CALL OResultSet::getBlob(sal_Int32 column)
...@@ -394,7 +394,7 @@ Reference< XBlob > SAL_CALL OResultSet::getBlob(sal_Int32 column) ...@@ -394,7 +394,7 @@ Reference< XBlob > SAL_CALL OResultSet::getBlob(sal_Int32 column)
checkColumnIndex(column); checkColumnIndex(column);
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getBlob", *this); mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getBlob", *this);
return NULL; return nullptr;
} }
Reference< XRef > SAL_CALL OResultSet::getRef(sal_Int32 column) Reference< XRef > SAL_CALL OResultSet::getRef(sal_Int32 column)
...@@ -406,7 +406,7 @@ Reference< XRef > SAL_CALL OResultSet::getRef(sal_Int32 column) ...@@ -406,7 +406,7 @@ Reference< XRef > SAL_CALL OResultSet::getRef(sal_Int32 column)
checkColumnIndex(column); checkColumnIndex(column);
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getRef", *this); mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getRef", *this);
return NULL; return nullptr;
} }
Any SAL_CALL OResultSet::getObject(sal_Int32 column, const Reference< XNameAccess >& /* typeMap */) Any SAL_CALL OResultSet::getObject(sal_Int32 column, const Reference< XNameAccess >& /* typeMap */)
......
...@@ -63,7 +63,7 @@ struct ProviderRequest ...@@ -63,7 +63,7 @@ struct ProviderRequest
{ {
if (!xRet.is() && (Implname == sImplementationName)) { if (!xRet.is() && (Implname == sImplementationName)) {
try { try {
xRet = creator( xServiceManager, sImplementationName,Factory, Services,0); xRet = creator( xServiceManager, sImplementationName,Factory, Services,nullptr);
} catch (...) { } catch (...) {
} }
} }
...@@ -78,7 +78,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( ...@@ -78,7 +78,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
void * pServiceManager, void * pServiceManager,
void * /* pRegistryKey */) void * /* pRegistryKey */)
{ {
void* pRet = 0; void* pRet = nullptr;
if (pServiceManager) { if (pServiceManager) {
ProviderRequest aReq(pServiceManager,pImplementationName); ProviderRequest aReq(pServiceManager,pImplementationName);
......
...@@ -75,7 +75,7 @@ void OCommonStatement::disposeResultSet() ...@@ -75,7 +75,7 @@ void OCommonStatement::disposeResultSet()
OSL_TRACE("OCommonStatement::disposeResultSet"); OSL_TRACE("OCommonStatement::disposeResultSet");
// free the cursor if alive // free the cursor if alive
delete cppStatement; delete cppStatement;
cppStatement = NULL; cppStatement = nullptr;
} }
void OCommonStatement::disposing() void OCommonStatement::disposing()
...@@ -87,7 +87,7 @@ void OCommonStatement::disposing() ...@@ -87,7 +87,7 @@ void OCommonStatement::disposing()
if (m_pConnection) { if (m_pConnection) {
m_pConnection->release(); m_pConnection->release();
m_pConnection = NULL; m_pConnection = nullptr;
} }
delete cppStatement; delete cppStatement;
......
...@@ -108,7 +108,7 @@ namespace connectivity ...@@ -108,7 +108,7 @@ namespace connectivity
if (!--s_nRefCount) if (!--s_nRefCount)
{ {
delete s_pProps; delete s_pProps;
s_pProps = NULL; s_pProps = nullptr;
} }
} }
...@@ -134,7 +134,7 @@ namespace connectivity ...@@ -134,7 +134,7 @@ namespace connectivity
sal_Int32 OPropertyArrayUsageHelper< TYPE >::s_nRefCount = 0; sal_Int32 OPropertyArrayUsageHelper< TYPE >::s_nRefCount = 0;
template<class TYPE> template<class TYPE>
::cppu::IPropertyArrayHelper* OPropertyArrayUsageHelper< TYPE >::s_pProps = NULL; ::cppu::IPropertyArrayHelper* OPropertyArrayUsageHelper< TYPE >::s_pProps = nullptr;
template<class TYPE> template<class TYPE>
::osl::Mutex OPropertyArrayUsageHelper< TYPE >::s_aMutex; ::osl::Mutex OPropertyArrayUsageHelper< TYPE >::s_aMutex;
......
...@@ -777,7 +777,7 @@ TypeInfoDef mysqlc_types[] = { ...@@ -777,7 +777,7 @@ TypeInfoDef mysqlc_types[] = {
// ----------- MySQL-Type: TIMESTAMP SDBC-Type: TIMESTAMP ---------- // ----------- 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
} }
}; };
......
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