diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-13 21:13:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-13 22:42:35 +0100 |
commit | 35fd0cf311d0ab6e647ef8a244f350d8a690e734 (patch) | |
tree | 2e27440530f16dc3d2261aff06c0570519a7a8ef | |
parent | d8160fa8343a395cff0116286dd24894b076c02b (diff) |
cppcheck: noExplicitConstructor
Change-Id: I39194062ba68c4cb1ccc9b93c629f005ccd02497
-rw-r--r-- | dtrans/source/cnttype/mcnttype.hxx | 2 | ||||
-rw-r--r-- | editeng/source/outliner/outlobj.cxx | 2 | ||||
-rw-r--r-- | embeddedobj/source/commonembedding/xfactory.hxx | 4 | ||||
-rw-r--r-- | embeddedobj/source/general/docholder.cxx | 19 | ||||
-rw-r--r-- | embeddedobj/source/general/intercept.cxx | 2 | ||||
-rw-r--r-- | embedserv/source/embed/intercept.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/dialog/backingcomp.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/backingwindow.hxx | 2 | ||||
-rw-r--r-- | slideshow/source/engine/animationnodes/animationcolornode.cxx | 2 | ||||
-rw-r--r-- | sot/source/base/object.cxx | 8 | ||||
-rw-r--r-- | sot/source/sdstor/storage.cxx | 16 | ||||
-rw-r--r-- | sot/source/sdstor/ucbstorage.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/app/gtk3gtkinst.cxx | 4 |
14 files changed, 33 insertions, 37 deletions
diff --git a/dtrans/source/cnttype/mcnttype.hxx b/dtrans/source/cnttype/mcnttype.hxx index d0d31a392cbf..e527c8e3bf8f 100644 --- a/dtrans/source/cnttype/mcnttype.hxx +++ b/dtrans/source/cnttype/mcnttype.hxx @@ -32,7 +32,7 @@ class CMimeContentType : public cppu::WeakImplHelper< css::datatransfer::XMimeContentType > { public: - CMimeContentType( const OUString& aCntType ); + explicit CMimeContentType(const OUString& rCntType); // XMimeContentType diff --git a/editeng/source/outliner/outlobj.cxx b/editeng/source/outliner/outlobj.cxx index 02094aea2a02..cb4098898675 100644 --- a/editeng/source/outliner/outlobj.cxx +++ b/editeng/source/outliner/outlobj.cxx @@ -107,7 +107,7 @@ struct OutlinerParaObject::Impl Impl( const EditTextObject& rTextObj, const ParagraphDataVector& rParaData, bool bIsEditDoc ) : mxData(new OutlinerParaObjData(rTextObj.Clone(), rParaData, bIsEditDoc)) {} - Impl( const EditTextObject& rTextObj ) : + explicit Impl(const EditTextObject& rTextObj) : mxData(new OutlinerParaObjData(rTextObj.Clone(), ParagraphDataVector(), true)) {} Impl( const Impl& r ) : mxData(r.mxData) {} diff --git a/embeddedobj/source/commonembedding/xfactory.hxx b/embeddedobj/source/commonembedding/xfactory.hxx index cef18173c78d..81f1506383d3 100644 --- a/embeddedobj/source/commonembedding/xfactory.hxx +++ b/embeddedobj/source/commonembedding/xfactory.hxx @@ -37,7 +37,7 @@ class OOoEmbeddedObjectFactory : public ::cppu::WeakImplHelper< ::comphelper::MimeConfigurationHelper m_aConfigHelper; public: - OOoEmbeddedObjectFactory( + explicit OOoEmbeddedObjectFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext ) : m_xContext( rxContext ) , m_aConfigHelper( rxContext ) @@ -84,7 +84,7 @@ class OOoSpecialEmbeddedObjectFactory : public ::cppu::WeakImplHelper< ::comphelper::MimeConfigurationHelper m_aConfigHelper; public: - OOoSpecialEmbeddedObjectFactory( + explicit OOoSpecialEmbeddedObjectFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext ) : m_xContext( rxContext ) , m_aConfigHelper( rxContext ) diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index f8437c29e39c..0212200c2af8 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -78,26 +78,23 @@ using namespace ::com::sun::star; - - -class IntCounterGuard { - sal_Int32& m_nFlag; +class IntCounterGuard +{ + sal_Int32& m_rFlag; public: - IntCounterGuard( sal_Int32& nFlag ) - : m_nFlag( nFlag ) + explicit IntCounterGuard(sal_Int32& rFlag) + : m_rFlag(rFlag) { - m_nFlag++; + ++m_rFlag; } ~IntCounterGuard() { - if ( m_nFlag ) - m_nFlag--; + if (m_rFlag) + --m_rFlag; } }; - - static void InsertMenu_Impl( const uno::Reference< container::XIndexContainer >& xTargetMenu, sal_Int32 nTargetIndex, const uno::Reference< container::XIndexAccess >& xSourceMenu, diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx index 079d912dde6b..732cac693f86 100644 --- a/embeddedobj/source/general/intercept.cxx +++ b/embeddedobj/source/general/intercept.cxx @@ -34,7 +34,7 @@ class StatusChangeListenerContainer : public cppu::OMultiTypeInterfaceContainerHelperVar<OUString> { public: - StatusChangeListenerContainer( ::osl::Mutex& aMutex ) + explicit StatusChangeListenerContainer(osl::Mutex& aMutex) : cppu::OMultiTypeInterfaceContainerHelperVar<OUString>(aMutex) { } diff --git a/embedserv/source/embed/intercept.cxx b/embedserv/source/embed/intercept.cxx index 20dcfd116511..d540fa4a5610 100644 --- a/embedserv/source/embed/intercept.cxx +++ b/embedserv/source/embed/intercept.cxx @@ -36,7 +36,7 @@ class StatusChangeListenerContainer : public cppu::OMultiTypeInterfaceContainerHelperVar<OUString> { public: - StatusChangeListenerContainer( ::osl::Mutex& aMutex ) + explicit StatusChangeListenerContainer(osl::Mutex& aMutex) : cppu::OMultiTypeInterfaceContainerHelperVar<OUString>(aMutex) { } diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 693301db2acd..128b40888aab 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -714,14 +714,13 @@ OString ScModelObj::getTextSelection(const char* pMimeType, OString& rUsedMimeTy ScEditShell* pShell; ScDrawShell* pDrawShell; - ScDrawTextObjectBar* pTextShell; TransferableDataHelper aDataHelper; ScViewData* pViewData = ScDocShell::GetViewData(); uno::Reference<datatransfer::XTransferable> xTransferable; if (( pShell = PTR_CAST( ScEditShell, pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) ))) xTransferable = pShell->GetEditView()->GetTransferable(); - else if (( pTextShell = PTR_CAST( ScDrawTextObjectBar, pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) ))) + else if ((PTR_CAST( ScDrawTextObjectBar, pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) ))) { ScDrawView* pView = pViewData->GetScDrawView(); OutlinerView* pOutView = pView->GetTextEditOutlinerView(); diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx index ca8639422c04..5ce6b62168ca 100644 --- a/sfx2/source/dialog/backingcomp.cxx +++ b/sfx2/source/dialog/backingcomp.cxx @@ -98,7 +98,7 @@ private: public: - BackingComp( const css::uno::Reference< css::uno::XComponentContext >& xContext ); + explicit BackingComp(const css::uno::Reference< css::uno::XComponentContext >& xContext); virtual ~BackingComp( ); // XInterface diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx index ad63152ab4e8..6a42becc4e35 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -116,7 +116,7 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer void initializeLocalView(); public: - BackingWindow(vcl::Window* pParent); + explicit BackingWindow(vcl::Window* pParent); virtual ~BackingWindow(); virtual void dispose() SAL_OVERRIDE; diff --git a/slideshow/source/engine/animationnodes/animationcolornode.cxx b/slideshow/source/engine/animationnodes/animationcolornode.cxx index 1a61035ebb05..78ac12e06a33 100644 --- a/slideshow/source/engine/animationnodes/animationcolornode.cxx +++ b/slideshow/source/engine/animationnodes/animationcolornode.cxx @@ -41,7 +41,7 @@ namespace { class HSLWrapper : public HSLColorAnimation { public: - HSLWrapper( const ColorAnimationSharedPtr& rAnimation ) + explicit HSLWrapper( const ColorAnimationSharedPtr& rAnimation ) : mpAnimation( rAnimation ) { ENSURE_OR_THROW( diff --git a/sot/source/base/object.cxx b/sot/source/base/object.cxx index 88e457e4bd8e..7c1054c5e97b 100644 --- a/sot/source/base/object.cxx +++ b/sot/source/base/object.cxx @@ -24,12 +24,12 @@ class SotObjectFactory : public SotFactory { public: - SotObjectFactory( const SvGlobalName & rName ) - : SotFactory( rName ) - {} + explicit SotObjectFactory(const SvGlobalName& rName) + : SotFactory( rName ) + { + } }; - SotFactory * SotObject::ClassFactory() { SotFactory **ppFactory = GetFactoryAdress(); diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index 9a23f5f17933..d22db40c8084 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -44,12 +44,12 @@ using namespace ::com::sun::star; class SotStorageStreamFactory : public SotFactory { public: - SotStorageStreamFactory( const SvGlobalName & rName ) - : SotFactory( rName ) - {} + explicit SotStorageStreamFactory(const SvGlobalName& rName) + : SotFactory(rName) + { + } }; - SotFactory * SotStorageStream::ClassFactory() { SotFactory **ppFactory = GetFactoryAdress(); @@ -293,12 +293,12 @@ bool SotStorageStream::SetProperty( const OUString& rName, const ::com::sun::sta class SotStorageFactory : public SotFactory { public: - SotStorageFactory( const SvGlobalName & rName ) - : SotFactory( rName ) - {} + explicit SotStorageFactory(const SvGlobalName & rName) + : SotFactory(rName) + { + } }; - SotFactory * SotStorage::ClassFactory() { SotFactory **ppFactory = GetFactoryAdress(); diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 77ac24956701..d6321fd797bb 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -90,7 +90,7 @@ protected: SvStream* m_pSvStream; public: - FileStreamWrapper_Impl( const OUString& rName ); + explicit FileStreamWrapper_Impl(const OUString& rName); virtual ~FileStreamWrapper_Impl(); virtual void SAL_CALL seek( sal_Int64 _nLocation ) throw ( IllegalArgumentException, IOException, RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/vcl/unx/gtk3/app/gtk3gtkinst.cxx b/vcl/unx/gtk3/app/gtk3gtkinst.cxx index 9d5438d8fd75..be105ed064f3 100644 --- a/vcl/unx/gtk3/app/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/app/gtk3gtkinst.cxx @@ -101,7 +101,7 @@ private: std::map<OUString, GdkAtom> m_aMimeTypeToAtom; public: - GtkTransferable(GdkAtom nSelection) + explicit GtkTransferable(GdkAtom nSelection) : m_nSelection(nSelection) { } @@ -289,7 +289,7 @@ class VclGtkClipboard : public: - VclGtkClipboard(GdkAtom nSelection); + explicit VclGtkClipboard(GdkAtom nSelection); virtual ~VclGtkClipboard(); /* |