diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-12 09:38:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-12 12:48:22 +0200 |
commit | feca66c513a681769c4b66ed1f1e0c70dada246c (patch) | |
tree | b2f806de7f370439fecc69dda5172ba671b799df /ucb/source/cacher | |
parent | 99e3703a845c643f17b589cf8174677ef88bb89a (diff) |
loplugin:simplifyconstruct in toolkit..ucb
Change-Id: Ica3efbdbf05a8161861b8be1ccdc62ab4aec1d69
Reviewed-on: https://gerrit.libreoffice.org/60371
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb/source/cacher')
-rw-r--r-- | ucb/source/cacher/cachedcontentresultset.cxx | 10 | ||||
-rw-r--r-- | ucb/source/cacher/contentresultsetwrapper.cxx | 8 | ||||
-rw-r--r-- | ucb/source/cacher/dynamicresultsetwrapper.cxx | 22 |
3 files changed, 10 insertions, 30 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index 77d897007076..5bd39fde2637 100644 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.cxx @@ -122,9 +122,7 @@ template<typename T> T CachedContentResultSet::rowOriginGet( CachedContentResultSet::CCRS_Cache::CCRS_Cache( const Reference< XContentIdentifierMapping > & xMapping ) - : m_pResult( nullptr ) - , m_xContentIdentifierMapping( xMapping ) - , m_pMappedReminder( nullptr ) + : m_xContentIdentifierMapping( xMapping ) { } @@ -425,8 +423,7 @@ static const char g_sPropertyNameForFetchDirection[] = "FetchDirection"; CCRS_PropertySetInfo::CCRS_PropertySetInfo( Reference< XPropertySetInfo > const & xInfo ) - : m_pProperties( nullptr ) - , m_nFetchSizePropertyHandle( -1 ) + : m_nFetchSizePropertyHandle( -1 ) , m_nFetchDirectionPropertyHandle( -1 ) { //initialize list of properties: @@ -640,8 +637,6 @@ CachedContentResultSet::CachedContentResultSet( : ContentResultSetWrapper( xOrigin ) , m_xContext( rxContext ) - , m_xFetchProvider( nullptr ) - , m_xFetchProviderForContentAccess( nullptr ) , m_xContentIdentifierMapping( xContentIdentifierMapping ) , m_nRow( 0 ) // Position is one-based. Zero means: before first element. @@ -662,7 +657,6 @@ CachedContentResultSet::CachedContentResultSet( , m_aCacheContentIdentifier( m_xContentIdentifierMapping ) , m_aCacheContent( m_xContentIdentifierMapping ) , m_bTriedToGetTypeConverter( false ) - , m_xTypeConverter( nullptr ) { m_xFetchProvider.set( m_xResultSetOrigin, UNO_QUERY ); OSL_ENSURE( m_xFetchProvider.is(), "interface XFetchProvider is required" ); diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx b/ucb/source/cacher/contentresultsetwrapper.cxx index 32e6f3edf59b..e7f264ee9b0c 100644 --- a/ucb/source/cacher/contentresultsetwrapper.cxx +++ b/ucb/source/cacher/contentresultsetwrapper.cxx @@ -43,17 +43,9 @@ using namespace cppu; ContentResultSetWrapper::ContentResultSetWrapper( Reference< XResultSet > const & xOrigin ) : m_xResultSetOrigin( xOrigin ) - , m_xRowOrigin( nullptr ) - , m_xContentAccessOrigin( nullptr ) - , m_xPropertySetOrigin( nullptr ) - , m_xPropertySetInfo( nullptr ) , m_nForwardOnly( 2 ) - , m_xMetaDataFromOrigin( nullptr ) , m_bDisposed( false ) , m_bInDispose( false ) - , m_pDisposeEventListeners( nullptr ) - , m_pPropertyChangeListeners( nullptr ) - , m_pVetoableChangeListeners( nullptr ) { m_xMyListenerImpl = new ContentResultSetWrapperListener( this ); diff --git a/ucb/source/cacher/dynamicresultsetwrapper.cxx b/ucb/source/cacher/dynamicresultsetwrapper.cxx index 643d2280cd5e..b52806fd76ee 100644 --- a/ucb/source/cacher/dynamicresultsetwrapper.cxx +++ b/ucb/source/cacher/dynamicresultsetwrapper.cxx @@ -45,18 +45,12 @@ DynamicResultSetWrapper::DynamicResultSetWrapper( : m_bDisposed( false ) , m_bInDispose( false ) - , m_pDisposeEventListeners( nullptr ) , m_xContext( rxContext ) , m_bStatic( false ) , m_bGotWelcome( false ) , m_xSource( xOrigin ) - , m_xSourceResultOne( nullptr ) - , m_xSourceResultTwo( nullptr ) // , m_xSourceResultCurrent( NULL ) // , m_bUseOne( NULL ) - , m_xMyResultOne( nullptr ) - , m_xMyResultTwo( nullptr ) - , m_xListener( nullptr ) { m_xMyListenerImpl = new DynamicResultSetWrapperListener( this ); //call impl_init() at the end of constructor of derived class @@ -67,7 +61,7 @@ void DynamicResultSetWrapper::impl_init() //call this at the end of constructor of derived class - Reference< XDynamicResultSet > xSource = nullptr; + Reference< XDynamicResultSet > xSource; { osl::Guard< osl::Mutex > aGuard( m_aMutex ); xSource = m_xSource; @@ -291,8 +285,8 @@ void SAL_CALL DynamicResultSetWrapper::setSource( const Reference< XInterface > OSL_ENSURE( xSourceDynamic.is(), "the given source is not of required type XDynamicResultSet" ); - Reference< XDynamicResultSetListener > xListener = nullptr; - Reference< XDynamicResultSetListener > xMyListenerImpl = nullptr; + Reference< XDynamicResultSetListener > xListener; + Reference< XDynamicResultSetListener > xMyListenerImpl; bool bStatic = false; { @@ -320,8 +314,8 @@ Reference< XResultSet > SAL_CALL DynamicResultSetWrapper::getStaticResultSet() { impl_EnsureNotDisposed(); - Reference< XDynamicResultSet > xSource = nullptr; - Reference< XEventListener > xMyListenerImpl = nullptr; + Reference< XDynamicResultSet > xSource; + Reference< XEventListener > xMyListenerImpl; { osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( m_xListener.is() ) @@ -350,8 +344,8 @@ void SAL_CALL DynamicResultSetWrapper::setListener( const Reference< XDynamicRes { impl_EnsureNotDisposed(); - Reference< XDynamicResultSet > xSource = nullptr; - Reference< XDynamicResultSetListener > xMyListenerImpl = nullptr; + Reference< XDynamicResultSet > xSource; + Reference< XDynamicResultSetListener > xMyListenerImpl; { osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( m_xListener.is() ) @@ -413,7 +407,7 @@ sal_Int16 SAL_CALL DynamicResultSetWrapper::getCapabilities() impl_EnsureNotDisposed(); m_aSourceSet.wait(); - Reference< XDynamicResultSet > xSource = nullptr; + Reference< XDynamicResultSet > xSource; { osl::Guard< osl::Mutex > aGuard( m_aMutex ); xSource = m_xSource; |