diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-01-07 09:26:48 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-01-07 19:27:28 +0000 |
commit | c9be2744d8ebe673d9cd4b0b7b680565bc544329 (patch) | |
tree | 23fd666cfefe4dc9e70d557e9890fe02b87b6d80 /embedserv | |
parent | 7994b77819a5de7a6da46ab01386883559e7a7d1 (diff) |
cppcheck: noExplicitConstructor
Change-Id: Ifdcb1cc12645d6cdba81d16f94f0268696187cde
Reviewed-on: https://gerrit.libreoffice.org/21201
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'embedserv')
-rw-r--r-- | embedserv/source/inprocserv/advisesink.hxx | 2 | ||||
-rw-r--r-- | embedserv/source/inprocserv/dllentry.cxx | 2 | ||||
-rw-r--r-- | embedserv/source/inprocserv/inprocembobj.cxx | 6 | ||||
-rw-r--r-- | embedserv/source/inprocserv/inprocembobj.h | 4 | ||||
-rw-r--r-- | embedserv/source/inprocserv/smartpointer.hxx | 6 |
5 files changed, 11 insertions, 9 deletions
diff --git a/embedserv/source/inprocserv/advisesink.hxx b/embedserv/source/inprocserv/advisesink.hxx index a30653aa0a84..6a496bad912c 100644 --- a/embedserv/source/inprocserv/advisesink.hxx +++ b/embedserv/source/inprocserv/advisesink.hxx @@ -49,7 +49,7 @@ public: OleWrapperAdviseSink(); // an AdviseSink for IOleObject interface - OleWrapperAdviseSink( const ComSmart< IAdviseSink >& pListener ); + explicit OleWrapperAdviseSink( const ComSmart< IAdviseSink >& pListener ); // an AdviseSink for IDataObject interface OleWrapperAdviseSink( const ComSmart< IAdviseSink >& pListener, FORMATETC* pFormatEtc, DWORD nDataRegFlag ); diff --git a/embedserv/source/inprocserv/dllentry.cxx b/embedserv/source/inprocserv/dllentry.cxx index 5f70df9138d1..b7086068a3a0 100644 --- a/embedserv/source/inprocserv/dllentry.cxx +++ b/embedserv/source/inprocserv/dllentry.cxx @@ -140,7 +140,7 @@ class InprocEmbedProvider_Impl : public IClassFactory, public InprocCountedObjec { public: - InprocEmbedProvider_Impl( const GUID& guid ); + explicit InprocEmbedProvider_Impl( const GUID& guid ); virtual ~InprocEmbedProvider_Impl(); /* IUnknown methods */ diff --git a/embedserv/source/inprocserv/inprocembobj.cxx b/embedserv/source/inprocserv/inprocembobj.cxx index 912efc4dc160..70db0c218ee9 100644 --- a/embedserv/source/inprocserv/inprocembobj.cxx +++ b/embedserv/source/inprocserv/inprocembobj.cxx @@ -1018,7 +1018,8 @@ STDMETHODIMP InprocEmbedDocument_Impl::Advise( IAdviseSink *pAdvSink, DWORD *pdw ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) { - ComSmart< OleWrapperAdviseSink > pOwnAdvise( new OleWrapperAdviseSink( pAdvSink ) ); + ComSmart<IAdviseSink> aListener(pAdvSink); + ComSmart<OleWrapperAdviseSink> pOwnAdvise(new OleWrapperAdviseSink(aListener)); DWORD nRegID = 0; if ( SUCCEEDED( pOleObject->Advise( pOwnAdvise, &nRegID ) ) && nRegID > 0 ) @@ -1450,7 +1451,8 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetAdvise( DWORD aspects, DWORD advf, IAd ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pIViewObject ) { - ComSmart< OleWrapperAdviseSink > pOwnAdvise( new OleWrapperAdviseSink( pAdvSink, aspects, advf ) ); + ComSmart<IAdviseSink> aListener(pAdvSink); + ComSmart<OleWrapperAdviseSink> pOwnAdvise(new OleWrapperAdviseSink(aListener, aspects, advf)); if ( SUCCEEDED( pIViewObject->SetAdvise( aspects, advf, pOwnAdvise ) ) ) { diff --git a/embedserv/source/inprocserv/inprocembobj.h b/embedserv/source/inprocserv/inprocembobj.h index 95a28ed2f94f..83e5c10470d5 100644 --- a/embedserv/source/inprocserv/inprocembobj.h +++ b/embedserv/source/inprocserv/inprocembobj.h @@ -94,7 +94,7 @@ class InprocEmbedDocument_Impl : public InprocCountedObject_Impl InprocEmbedDocument_Impl& m_rOwnDocument; public: - InternalCacheWrapper( InprocEmbedDocument_Impl& rOwnDocument ) + explicit InternalCacheWrapper( InprocEmbedDocument_Impl& rOwnDocument ) : m_rOwnDocument( rOwnDocument ) {} @@ -120,7 +120,7 @@ class InprocEmbedDocument_Impl : public InprocCountedObject_Impl public: - InprocEmbedDocument_Impl( const GUID& guid ) + explicit InprocEmbedDocument_Impl( const GUID& guid ) : m_refCount( 0 ) , m_bDeleted( FALSE ) , m_guid( guid ) diff --git a/embedserv/source/inprocserv/smartpointer.hxx b/embedserv/source/inprocserv/smartpointer.hxx index 62011df14556..dab46ada769a 100644 --- a/embedserv/source/inprocserv/smartpointer.hxx +++ b/embedserv/source/inprocserv/smartpointer.hxx @@ -50,7 +50,7 @@ public: m_pInterface->AddRef(); } - ComSmart( T* pInterface ) + explicit ComSmart( T* pInterface ) : m_pInterface( pInterface ) { if ( m_pInterface != NULL ) @@ -136,7 +136,7 @@ class CSGuard CRITICAL_SECTION* m_pCriticalSection; public: - CSGuard( CRITICAL_SECTION* pCS ) + explicit CSGuard( CRITICAL_SECTION* pCS ) : m_pCriticalSection( pCS ) { if ( m_pCriticalSection ) @@ -155,7 +155,7 @@ class ULONGGuard ULONG* m_pValue; public: - ULONGGuard( ULONG* pValue ) + explicit ULONGGuard( ULONG* pValue ) : m_pValue( pValue ) { if ( m_pValue ) |