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 /embeddedobj | |
parent | d8160fa8343a395cff0116286dd24894b076c02b (diff) |
cppcheck: noExplicitConstructor
Change-Id: I39194062ba68c4cb1ccc9b93c629f005ccd02497
Diffstat (limited to 'embeddedobj')
-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 |
3 files changed, 11 insertions, 14 deletions
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) { } |