diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-06-08 20:53:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-06-09 10:34:00 +0100 |
commit | ad62165065a0f96933d8b491770775bb57ac51bd (patch) | |
tree | be8f806481f96756bc33d9414640b31dd1e84f5f /cppuhelper | |
parent | cc0e9a37de8bceeb224b03a5bb1827b087e3e7b5 (diff) |
cppcheck: noExplicitConstructor
Change-Id: Ic33ee6936f40bec4f3a82aea39a180ae6e9a0928
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/compat.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/component_context.cxx | 8 | ||||
-rw-r--r-- | cppuhelper/source/factory.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/propshlp.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/tdmgr.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/typemanager.cxx | 4 | ||||
-rw-r--r-- | cppuhelper/source/weak.cxx | 4 | ||||
-rw-r--r-- | cppuhelper/test/cfg_test.cxx | 7 | ||||
-rw-r--r-- | cppuhelper/test/testimplhelper.cxx | 2 |
10 files changed, 18 insertions, 17 deletions
diff --git a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx index 6c1870fa5cca..ff7c7925276c 100644 --- a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx +++ b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx @@ -46,7 +46,7 @@ class ContainerListener : public ::cppu::WeakImplHelper1< XEventListener > { ContainerStats *m_pStats; public: - ContainerListener(ContainerStats *pStats) + explicit ContainerListener(ContainerStats *pStats) : m_pStats(pStats) { m_pStats->m_nAlive++; } virtual ~ContainerListener() { m_pStats->m_nAlive--; } virtual void SAL_CALL disposing( const EventObject& ) diff --git a/cppuhelper/source/compat.cxx b/cppuhelper/source/compat.cxx index d1a7dc8b1419..50e19bfa5b8e 100644 --- a/cppuhelper/source/compat.cxx +++ b/cppuhelper/source/compat.cxx @@ -151,7 +151,7 @@ SAL_WNOUNREACHABLE_CODE_PUSH struct SAL_DLLPUBLIC_EXPORT ClassDataBase { ClassDataBase(); - ClassDataBase(sal_Int32); + explicit ClassDataBase(sal_Int32); ~ClassDataBase(); }; diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx index 7451daf4cf56..4dede24cd3a7 100644 --- a/cppuhelper/source/component_context.cxx +++ b/cppuhelper/source/component_context.cxx @@ -285,16 +285,16 @@ static inline void try_dispose( Reference< lang::XComponent > const & xComp ) } } - - class DisposingForwarder : public WeakImplHelper1< lang::XEventListener > { Reference< lang::XComponent > m_xTarget; - inline DisposingForwarder( Reference< lang::XComponent > const & xTarget ) + explicit DisposingForwarder( Reference< lang::XComponent > const & xTarget ) : m_xTarget( xTarget ) - { OSL_ASSERT( m_xTarget.is() ); } + { + OSL_ASSERT( m_xTarget.is() ); + } public: // listens at source for disposing, then disposes target static inline void listen( diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index a634086fd33b..f7f7900740d2 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -877,7 +877,7 @@ class OFactoryProxyHelper : public WeakImplHelper< XServiceInfo, XSingleServiceF public: - OFactoryProxyHelper( const Reference<XSingleServiceFactory > & rFactory ) + explicit OFactoryProxyHelper( const Reference<XSingleServiceFactory > & rFactory ) : xFactory( rFactory ) {} diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx index 153a92139865..904bf9ab09a6 100644 --- a/cppuhelper/source/propshlp.cxx +++ b/cppuhelper/source/propshlp.cxx @@ -76,7 +76,7 @@ class OPropertySetHelperInfo_Impl Sequence < Property > aInfos; public: - OPropertySetHelperInfo_Impl( IPropertyArrayHelper & rHelper_ ); + explicit OPropertySetHelperInfo_Impl( IPropertyArrayHelper & rHelper_ ); // XPropertySetInfo-methods virtual Sequence< Property > SAL_CALL getProperties() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx index 6c4238415283..d93d107bd21b 100644 --- a/cppuhelper/source/tdmgr.cxx +++ b/cppuhelper/source/tdmgr.cxx @@ -618,7 +618,7 @@ class EventListenerImpl Reference< container::XHierarchicalNameAccess > m_xTDMgr; public: - inline EventListenerImpl( + explicit EventListenerImpl( Reference< container::XHierarchicalNameAccess > const & xTDMgr ) : m_xTDMgr( xTDMgr ) {} diff --git a/cppuhelper/source/typemanager.cxx b/cppuhelper/source/typemanager.cxx index 2e32c5b33764..02de9ff43371 100644 --- a/cppuhelper/source/typemanager.cxx +++ b/cppuhelper/source/typemanager.cxx @@ -136,7 +136,7 @@ class PublishableDescription: public cppu::WeakImplHelper1< css::reflection::XPublished > { protected: - PublishableDescription(bool published): published_(published) {} + explicit PublishableDescription(bool published): published_(published) {} virtual ~PublishableDescription() {} @@ -847,7 +847,7 @@ MethodDescription::getExceptions() throw (css::uno::RuntimeException, std::excep class BaseOffset: private boost::noncopyable { public: - BaseOffset( + explicit BaseOffset( css::uno::Reference< css::reflection::XInterfaceTypeDescription2 > const & description); diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx index 7532955ad4e6..fa79faeaa82b 100644 --- a/cppuhelper/source/weak.cxx +++ b/cppuhelper/source/weak.cxx @@ -51,7 +51,7 @@ public: /** Hold the weak object without an acquire (only the pointer). */ - OWeakConnectionPoint( OWeakObject* pObj ) + explicit OWeakConnectionPoint( OWeakObject* pObj ) : m_aRefCount( 0 ) , m_pObject(pObj) , m_aReferences( getWeakMutex() ) @@ -320,7 +320,7 @@ namespace uno class OWeakRefListener: public XReference, private boost::noncopyable { public: - OWeakRefListener(const Reference< XInterface >& xInt); + explicit OWeakRefListener(const Reference< XInterface >& xInt); virtual ~OWeakRefListener(); // XInterface diff --git a/cppuhelper/test/cfg_test.cxx b/cppuhelper/test/cfg_test.cxx index 27e223936e3c..976dd3f99814 100644 --- a/cppuhelper/test/cfg_test.cxx +++ b/cppuhelper/test/cfg_test.cxx @@ -79,7 +79,7 @@ class ServiceImpl0 Reference< XComponentContext > m_xContext; public: - ServiceImpl0( Reference< XComponentContext > const & xContext ); + explicit ServiceImpl0( Reference< XComponentContext > const & xContext ); // XInitialization virtual void SAL_CALL initialize( const Sequence< Any >& rArgs ) throw (Exception, RuntimeException); @@ -150,9 +150,10 @@ sal_Bool ServiceImpl0::supportsService( const OUString & rServiceName ) class ServiceImpl1 : public ServiceImpl0 { public: - inline ServiceImpl1( Reference< XComponentContext > const & xContext ) + explicit ServiceImpl1( Reference< XComponentContext > const & xContext ) : ServiceImpl0( xContext ) - {} + { + } // XServiceInfo virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (RuntimeException); diff --git a/cppuhelper/test/testimplhelper.cxx b/cppuhelper/test/testimplhelper.cxx index 0f359e376e72..b099d55bcbd1 100644 --- a/cppuhelper/test/testimplhelper.cxx +++ b/cppuhelper/test/testimplhelper.cxx @@ -175,7 +175,7 @@ struct TestWeakImpl : public WeakImplHelper4< CA, DBA, FE, G > { return OUString("g"); } protected: - TestWeakImpl(int) {} + explicit TestWeakImpl(int) {} TestWeakImpl(int, int) {} |