diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-04-30 08:20:03 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-05-02 17:02:28 +0200 |
commit | 10d29c390dd58ed629dd27fe5ed35fae28eceec3 (patch) | |
tree | 7476cbb90fff182c5bec0a5a1ef9c41a3ad29f19 /cppuhelper | |
parent | a9243e626193ab4efe3a618413886773336a38e6 (diff) |
throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewrite
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/source/component.cxx | 4 | ||||
-rw-r--r-- | cppuhelper/source/exc_thrower.cxx | 8 | ||||
-rw-r--r-- | cppuhelper/source/factory.cxx | 12 | ||||
-rw-r--r-- | cppuhelper/source/implbase.cxx | 8 | ||||
-rw-r--r-- | cppuhelper/source/typemanager.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/typemanager.hxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/weak.cxx | 24 |
7 files changed, 30 insertions, 30 deletions
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx index c88713287c38..369e2ead7be5 100644 --- a/cppuhelper/source/component.cxx +++ b/cppuhelper/source/component.cxx @@ -63,12 +63,12 @@ Any OComponentHelper::queryAggregation( Type const & rType ) } return OWeakAggObject::queryAggregation( rType ); } -void OComponentHelper::acquire() throw () +void OComponentHelper::acquire() noexcept { OWeakAggObject::acquire(); } -void OComponentHelper::release() throw() +void OComponentHelper::release() noexcept { Reference<XInterface > x( xDelegator ); if (! x.is()) diff --git a/cppuhelper/source/exc_thrower.cxx b/cppuhelper/source/exc_thrower.cxx index ab7ed83f53e1..1bb8bfab13b3 100644 --- a/cppuhelper/source/exc_thrower.cxx +++ b/cppuhelper/source/exc_thrower.cxx @@ -54,8 +54,8 @@ struct ExceptionThrower : public uno_Interface, XExceptionThrower // XInterface virtual Any SAL_CALL queryInterface( Type const & type ) override; - virtual void SAL_CALL acquire() throw () override; - virtual void SAL_CALL release() throw () override; + virtual void SAL_CALL acquire() noexcept override; + virtual void SAL_CALL release() noexcept override; // XExceptionThrower virtual void SAL_CALL throwException( Any const & exc ) override; @@ -139,11 +139,11 @@ Any ExceptionThrower::queryInterface( Type const & type ) } -void ExceptionThrower::acquire() throw () +void ExceptionThrower::acquire() noexcept { } -void ExceptionThrower::release() throw () +void ExceptionThrower::release() noexcept { } diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index 1d997146f099..0cad2093070d 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -255,9 +255,9 @@ public: // XInterface Any SAL_CALL queryInterface( const Type & rType ) override; - void SAL_CALL acquire() throw() override + void SAL_CALL acquire() noexcept override { OComponentHelper::acquire(); } - void SAL_CALL release() throw() override + void SAL_CALL release() noexcept override { OComponentHelper::release(); } // XSingleServiceFactory @@ -454,8 +454,8 @@ public: // XInterface virtual Any SAL_CALL queryInterface( Type const & type ) override; - virtual void SAL_CALL acquire() throw () override; - virtual void SAL_CALL release() throw () override; + virtual void SAL_CALL acquire() noexcept override; + virtual void SAL_CALL release() noexcept override; // XTypeProvider virtual Sequence< Type > SAL_CALL getTypes() override; // XPropertySet @@ -519,13 +519,13 @@ Any SAL_CALL ORegistryFactoryHelper::queryInterface( } -void ORegistryFactoryHelper::acquire() throw () +void ORegistryFactoryHelper::acquire() noexcept { OFactoryComponentHelper::acquire(); } -void ORegistryFactoryHelper::release() throw () +void ORegistryFactoryHelper::release() noexcept { OFactoryComponentHelper::release(); } diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx index 1f00accecb27..0673ce692738 100644 --- a/cppuhelper/source/implbase.cxx +++ b/cppuhelper/source/implbase.cxx @@ -59,13 +59,13 @@ Any WeakComponentImplHelperBase::queryInterface( Type const & rType ) } void WeakComponentImplHelperBase::acquire() - throw () + noexcept { OWeakObject::acquire(); } void WeakComponentImplHelperBase::release() - throw () + noexcept { if (osl_atomic_decrement( &m_refCount ) != 0) return; @@ -182,13 +182,13 @@ Any WeakAggComponentImplHelperBase::queryAggregation( Type const & rType ) } void WeakAggComponentImplHelperBase::acquire() - throw () + noexcept { OWeakAggObject::acquire(); } void WeakAggComponentImplHelperBase::release() - throw () + noexcept { Reference<XInterface> const xDelegator_(xDelegator); if (xDelegator_.is()) { diff --git a/cppuhelper/source/typemanager.cxx b/cppuhelper/source/typemanager.cxx index 194d746d9452..eb6d7246009e 100644 --- a/cppuhelper/source/typemanager.cxx +++ b/cppuhelper/source/typemanager.cxx @@ -1881,7 +1881,7 @@ cppuhelper::TypeManager::resolve(OUString const & name) { return desc; } -cppuhelper::TypeManager::~TypeManager() throw () {} +cppuhelper::TypeManager::~TypeManager() noexcept {} void cppuhelper::TypeManager::disposing() {} //TODO diff --git a/cppuhelper/source/typemanager.hxx b/cppuhelper/source/typemanager.hxx index a1d6ce8cd78a..dcd415b888b1 100644 --- a/cppuhelper/source/typemanager.hxx +++ b/cppuhelper/source/typemanager.hxx @@ -55,7 +55,7 @@ public: OUString const & name); private: - virtual ~TypeManager() throw () override; + virtual ~TypeManager() noexcept override; virtual void SAL_CALL disposing() override; diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx index 06c6ed178def..e52dc607a0a3 100644 --- a/cppuhelper/source/weak.cxx +++ b/cppuhelper/source/weak.cxx @@ -66,8 +66,8 @@ public: // XInterface Any SAL_CALL queryInterface( const Type & rType ) override; - void SAL_CALL acquire() throw() override; - void SAL_CALL release() throw() override; + void SAL_CALL acquire() noexcept override; + void SAL_CALL release() noexcept override; // XAdapter css::uno::Reference< css::uno::XInterface > SAL_CALL queryAdapted() override; @@ -98,7 +98,7 @@ Any SAL_CALL OWeakConnectionPoint::queryInterface( const Type & rType ) } // XInterface -void SAL_CALL OWeakConnectionPoint::acquire() throw() +void SAL_CALL OWeakConnectionPoint::acquire() noexcept { #ifdef DBG_UTIL // catch things early which have been deleted and then re-acquired @@ -108,7 +108,7 @@ void SAL_CALL OWeakConnectionPoint::acquire() throw() } // XInterface -void SAL_CALL OWeakConnectionPoint::release() throw() +void SAL_CALL OWeakConnectionPoint::release() noexcept { if (! osl_atomic_decrement( &m_aRefCount )) { @@ -226,13 +226,13 @@ Any SAL_CALL OWeakObject::queryInterface( const Type & rType ) } // XInterface -void SAL_CALL OWeakObject::acquire() throw() +void SAL_CALL OWeakObject::acquire() noexcept { osl_atomic_increment( &m_refCount ); } // XInterface -void SAL_CALL OWeakObject::release() throw() +void SAL_CALL OWeakObject::release() noexcept { if (osl_atomic_decrement( &m_refCount ) == 0) { // notify/clear all weak-refs before object's dtor is executed @@ -289,7 +289,7 @@ OWeakAggObject::~OWeakAggObject() } // XInterface -void OWeakAggObject::acquire() throw() +void OWeakAggObject::acquire() noexcept { Reference<XInterface > x( xDelegator ); if (x.is()) @@ -299,7 +299,7 @@ void OWeakAggObject::acquire() throw() } // XInterface -void OWeakAggObject::release() throw() +void OWeakAggObject::release() noexcept { Reference<XInterface > x( xDelegator ); if (x.is()) @@ -352,8 +352,8 @@ public: // XInterface Any SAL_CALL queryInterface( const Type & rType ) override; - void SAL_CALL acquire() throw() override; - void SAL_CALL release() throw() override; + void SAL_CALL acquire() noexcept override; + void SAL_CALL release() noexcept override; // XReference void SAL_CALL dispose() override; @@ -406,13 +406,13 @@ Any SAL_CALL OWeakRefListener::queryInterface( const Type & rType ) } // XInterface -void SAL_CALL OWeakRefListener::acquire() throw() +void SAL_CALL OWeakRefListener::acquire() noexcept { osl_atomic_increment( &m_aRefCount ); } // XInterface -void SAL_CALL OWeakRefListener::release() throw() +void SAL_CALL OWeakRefListener::release() noexcept { if( ! osl_atomic_decrement( &m_aRefCount ) ) delete this; |