diff options
-rw-r--r-- | cppcanvas/source/mtfrenderer/implrenderer.cxx | 4 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/implbitmapcanvas.hxx | 2 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/implcanvas.hxx | 2 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/implcolor.hxx | 2 | ||||
-rw-r--r-- | cppu/source/AffineBridge/AffineBridge.cxx | 4 | ||||
-rw-r--r-- | cppu/source/threadpool/current.cxx | 48 | ||||
-rw-r--r-- | cppu/source/typelib/typelib.cxx | 2 | ||||
-rw-r--r-- | cppu/source/uno/IdentityMapping.cxx | 2 | ||||
-rw-r--r-- | cppu/source/uno/lbenv.cxx | 2 | ||||
-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 |
19 files changed, 49 insertions, 54 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 6fd6de509a1e..56ed3d9fb0a3 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -2648,7 +2648,7 @@ namespace cppcanvas class ActionRenderer { public: - ActionRenderer( const ::basegfx::B2DHomMatrix& rTransformation ) : + explicit ActionRenderer( const ::basegfx::B2DHomMatrix& rTransformation ) : maTransformation( rTransformation ), mbRet( true ) { @@ -2683,7 +2683,7 @@ namespace cppcanvas class AreaQuery { public: - AreaQuery( const ::basegfx::B2DHomMatrix& rTransformation ) : + explicit AreaQuery( const ::basegfx::B2DHomMatrix& rTransformation ) : maTransformation( rTransformation ), maBounds() { diff --git a/cppcanvas/source/wrapper/implbitmapcanvas.hxx b/cppcanvas/source/wrapper/implbitmapcanvas.hxx index 6f503e5ddf36..8c0be601a62d 100644 --- a/cppcanvas/source/wrapper/implbitmapcanvas.hxx +++ b/cppcanvas/source/wrapper/implbitmapcanvas.hxx @@ -38,7 +38,7 @@ namespace cppcanvas class ImplBitmapCanvas : public virtual BitmapCanvas, protected virtual ImplCanvas { public: - ImplBitmapCanvas( const ::com::sun::star::uno::Reference< + explicit ImplBitmapCanvas( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas >& rCanvas ); virtual ~ImplBitmapCanvas(); diff --git a/cppcanvas/source/wrapper/implcanvas.hxx b/cppcanvas/source/wrapper/implcanvas.hxx index 9a042540a5ea..86535fc06ba4 100644 --- a/cppcanvas/source/wrapper/implcanvas.hxx +++ b/cppcanvas/source/wrapper/implcanvas.hxx @@ -50,7 +50,7 @@ namespace cppcanvas class ImplCanvas : public virtual Canvas { public: - ImplCanvas( const ::com::sun::star::uno::Reference< + explicit ImplCanvas( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas >& rCanvas ); virtual ~ImplCanvas(); diff --git a/cppcanvas/source/wrapper/implcolor.hxx b/cppcanvas/source/wrapper/implcolor.hxx index 2d5e0310eb10..4c45844d8d56 100644 --- a/cppcanvas/source/wrapper/implcolor.hxx +++ b/cppcanvas/source/wrapper/implcolor.hxx @@ -37,7 +37,7 @@ namespace cppcanvas class ImplColor : public Color { public: - ImplColor( const ::com::sun::star::uno::Reference< + explicit ImplColor( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice ); virtual ~ImplColor(); diff --git a/cppu/source/AffineBridge/AffineBridge.cxx b/cppu/source/AffineBridge/AffineBridge.cxx index 2184a59461a1..b0f23d41162a 100644 --- a/cppu/source/AffineBridge/AffineBridge.cxx +++ b/cppu/source/AffineBridge/AffineBridge.cxx @@ -90,7 +90,7 @@ class InnerThread : public osl::Thread AffineBridge * m_pAffineBridge; public: - InnerThread(AffineBridge * threadEnvironment) + explicit InnerThread(AffineBridge * threadEnvironment) : m_pAffineBridge(threadEnvironment) { create(); @@ -113,7 +113,7 @@ class OuterThread : public osl::Thread AffineBridge * m_pAffineBridge; public: - OuterThread(AffineBridge * threadEnvironment); + explicit OuterThread(AffineBridge * threadEnvironment); }; OuterThread::OuterThread(AffineBridge * threadEnvironment) diff --git a/cppu/source/threadpool/current.cxx b/cppu/source/threadpool/current.cxx index 610d4b35e755..cc313cdf925a 100644 --- a/cppu/source/threadpool/current.cxx +++ b/cppu/source/threadpool/current.cxx @@ -106,41 +106,35 @@ class ThreadKey oslThreadKeyCallbackFunction _pCallback; public: - inline oslThreadKey getThreadKey(); - - inline ThreadKey( oslThreadKeyCallbackFunction pCallback ); - inline ~ThreadKey(); -}; - -inline ThreadKey::ThreadKey( oslThreadKeyCallbackFunction pCallback ) - : _bInit( false ) - , _hThreadKey( 0 ) - , _pCallback( pCallback ) -{ -} + oslThreadKey getThreadKey() + { + if (! _bInit) + { + MutexGuard aGuard( Mutex::getGlobalMutex() ); + if (! _bInit) + { + _hThreadKey = ::osl_createThreadKey( _pCallback ); + _bInit = true; + } + } + return _hThreadKey; + } -inline ThreadKey::~ThreadKey() -{ - if (_bInit) + explicit ThreadKey( oslThreadKeyCallbackFunction pCallback ) + : _bInit(false) + , _hThreadKey(0) + , _pCallback(pCallback) { - ::osl_destroyThreadKey( _hThreadKey ); } -} -inline oslThreadKey ThreadKey::getThreadKey() -{ - if (! _bInit) + ~ThreadKey() { - MutexGuard aGuard( Mutex::getGlobalMutex() ); - if (! _bInit) + if (_bInit) { - _hThreadKey = ::osl_createThreadKey( _pCallback ); - _bInit = true; + ::osl_destroyThreadKey( _hThreadKey ); } } - return _hThreadKey; -} - +}; extern "C" void SAL_CALL delete_IdContainer( void * p ) { diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx index ff76c8c98be1..740b9bcb7648 100644 --- a/cppu/source/typelib/typelib.cxx +++ b/cppu/source/typelib/typelib.cxx @@ -920,7 +920,7 @@ public: typedef std::vector< Entry > List; - BaseList(typelib_InterfaceTypeDescription const * desc); + explicit BaseList(typelib_InterfaceTypeDescription const * desc); List const & getList() const { return list; } diff --git a/cppu/source/uno/IdentityMapping.cxx b/cppu/source/uno/IdentityMapping.cxx index 270d065ca802..4f8266cb3aa0 100644 --- a/cppu/source/uno/IdentityMapping.cxx +++ b/cppu/source/uno/IdentityMapping.cxx @@ -33,7 +33,7 @@ struct IdentityMapping : public uno_Mapping sal_Int32 m_nRef; uno::Environment m_env; - IdentityMapping(uno::Environment const & rEnv); + explicit IdentityMapping(uno::Environment const & rEnv); }; extern "C" diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx index 8068e12c38de..239b81b595f2 100644 --- a/cppu/source/uno/lbenv.cxx +++ b/cppu/source/uno/lbenv.cxx @@ -82,7 +82,7 @@ struct ObjectEntry ::std::vector< InterfaceEntry > aInterfaces; bool mixedObject; - inline ObjectEntry( const OUString & rOId_ ); + explicit inline ObjectEntry( const OUString & rOId_ ); inline void append( uno_DefaultEnvironment * pEnv, 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) {} |