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 /include/comphelper | |
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 'include/comphelper')
-rw-r--r-- | include/comphelper/ChainablePropertySet.hxx | 8 | ||||
-rw-r--r-- | include/comphelper/ChainablePropertySetInfo.hxx | 2 | ||||
-rw-r--r-- | include/comphelper/MasterPropertySet.hxx | 6 | ||||
-rw-r--r-- | include/comphelper/MasterPropertySetInfo.hxx | 2 | ||||
-rw-r--r-- | include/comphelper/asyncnotification.hxx | 4 | ||||
-rw-r--r-- | include/comphelper/newarray.hxx | 2 | ||||
-rw-r--r-- | include/comphelper/propertysethelper.hxx | 4 | ||||
-rw-r--r-- | include/comphelper/propertysetinfo.hxx | 14 | ||||
-rw-r--r-- | include/comphelper/servicehelper.hxx | 4 | ||||
-rw-r--r-- | include/comphelper/uno3.hxx | 20 | ||||
-rw-r--r-- | include/comphelper/weak.hxx | 4 |
11 files changed, 35 insertions, 35 deletions
diff --git a/include/comphelper/ChainablePropertySet.hxx b/include/comphelper/ChainablePropertySet.hxx index 829b1a2d9fb6..fb4fbd744d9a 100644 --- a/include/comphelper/ChainablePropertySet.hxx +++ b/include/comphelper/ChainablePropertySet.hxx @@ -109,15 +109,15 @@ namespace comphelper public: ChainablePropertySet( comphelper::ChainablePropertySetInfo* pInfo, SolarMutex* pMutex ) - throw(); + noexcept; virtual ~ChainablePropertySet() - throw() override; + noexcept override; css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override { return ChainablePropertySetBase::queryInterface( aType ); } - void SAL_CALL acquire( ) throw () override + void SAL_CALL acquire( ) noexcept override { ChainablePropertySetBase::acquire( ); } - void SAL_CALL release( ) throw () override + void SAL_CALL release( ) noexcept override { ChainablePropertySetBase::release( ); } // XPropertySet diff --git a/include/comphelper/ChainablePropertySetInfo.hxx b/include/comphelper/ChainablePropertySetInfo.hxx index e35c534e7b0c..5ece0701c308 100644 --- a/include/comphelper/ChainablePropertySetInfo.hxx +++ b/include/comphelper/ChainablePropertySetInfo.hxx @@ -45,7 +45,7 @@ namespace comphelper private: virtual ~ChainablePropertySetInfo() - throw() override; + noexcept override; // XPropertySetInfo virtual css::uno::Sequence< css::beans::Property > SAL_CALL getProperties() override; diff --git a/include/comphelper/MasterPropertySet.hxx b/include/comphelper/MasterPropertySet.hxx index 6276f9008e52..acd9ce9c4af6 100644 --- a/include/comphelper/MasterPropertySet.hxx +++ b/include/comphelper/MasterPropertySet.hxx @@ -101,11 +101,11 @@ namespace comphelper public: MasterPropertySet( comphelper::MasterPropertySetInfo* pInfo, SolarMutex* pMutex ) - throw(); + noexcept; virtual ~MasterPropertySet() - throw(); + noexcept; void registerSlave ( ChainablePropertySet *pNewSet ) - throw(); + noexcept; // XPropertySet virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override; diff --git a/include/comphelper/MasterPropertySetInfo.hxx b/include/comphelper/MasterPropertySetInfo.hxx index 3293ee76483a..0e50cc457380 100644 --- a/include/comphelper/MasterPropertySetInfo.hxx +++ b/include/comphelper/MasterPropertySetInfo.hxx @@ -36,7 +36,7 @@ namespace comphelper private: virtual ~MasterPropertySetInfo() - throw() override; + noexcept override; void add( PropertyInfoHash &rHash, sal_uInt8 nMapId ); diff --git a/include/comphelper/asyncnotification.hxx b/include/comphelper/asyncnotification.hxx index 2daac286bf09..891495319c27 100644 --- a/include/comphelper/asyncnotification.hxx +++ b/include/comphelper/asyncnotification.hxx @@ -67,8 +67,8 @@ namespace comphelper */ virtual void processEvent( const AnyEvent& _rEvent ) = 0; - virtual void SAL_CALL acquire() throw () = 0; - virtual void SAL_CALL release() throw () = 0; + virtual void SAL_CALL acquire() noexcept = 0; + virtual void SAL_CALL release() noexcept = 0; protected: ~IEventProcessor() {} diff --git a/include/comphelper/newarray.hxx b/include/comphelper/newarray.hxx index a904f7d1ed0d..6764cb3bfe3b 100644 --- a/include/comphelper/newarray.hxx +++ b/include/comphelper/newarray.hxx @@ -27,7 +27,7 @@ namespace comphelper { template<typename T> T * -newArray_null(size_t const n) throw() +newArray_null(size_t const n) noexcept { if ((::std::numeric_limits<size_t>::max() / sizeof(T)) <= n) { return 0; diff --git a/include/comphelper/propertysethelper.hxx b/include/comphelper/propertysethelper.hxx index 33321e2cc994..131465dc0f46 100644 --- a/include/comphelper/propertysethelper.hxx +++ b/include/comphelper/propertysethelper.hxx @@ -62,8 +62,8 @@ protected: virtual css::uno::Any _getPropertyDefault( const comphelper::PropertyMapEntry* pEntry ); public: - PropertySetHelper( rtl::Reference<comphelper::PropertySetInfo> const & xInfo ) throw(); - virtual ~PropertySetHelper() throw(); + PropertySetHelper( rtl::Reference<comphelper::PropertySetInfo> const & xInfo ) noexcept; + virtual ~PropertySetHelper() noexcept; // XPropertySet virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override; diff --git a/include/comphelper/propertysetinfo.hxx b/include/comphelper/propertysetinfo.hxx index aaf8484ad879..518b83375a3f 100644 --- a/include/comphelper/propertysetinfo.hxx +++ b/include/comphelper/propertysetinfo.hxx @@ -93,23 +93,23 @@ class COMPHELPER_DLLPUBLIC PropertySetInfo final private: std::unique_ptr<PropertyMapImpl> mpImpl; public: - PropertySetInfo() throw(); - PropertySetInfo( PropertyMapEntry const * pMap ) throw(); - PropertySetInfo(css::uno::Sequence<css::beans::Property> const &) throw(); - virtual ~PropertySetInfo() throw() override; + PropertySetInfo() noexcept; + PropertySetInfo( PropertyMapEntry const * pMap ) noexcept; + PropertySetInfo(css::uno::Sequence<css::beans::Property> const &) noexcept; + virtual ~PropertySetInfo() noexcept override; /** returns a stl map with all PropertyMapEntry pointer.<p> The key is the property name. */ - const PropertyMap& getPropertyMap() const throw(); + const PropertyMap& getPropertyMap() const noexcept; /** adds an array of PropertyMapEntry to this instance.<p> The end is marked with a PropertyMapEntry where mpName equals NULL</p> */ - void add( PropertyMapEntry const * pMap ) throw(); + void add( PropertyMapEntry const * pMap ) noexcept; /** removes an already added PropertyMapEntry which string in mpName equals to aName */ - void remove( const OUString& aName ) throw(); + void remove( const OUString& aName ) noexcept; virtual css::uno::Sequence< css::beans::Property > SAL_CALL getProperties() override; virtual css::beans::Property SAL_CALL getPropertyByName( const OUString& aName ) override; diff --git a/include/comphelper/servicehelper.hxx b/include/comphelper/servicehelper.hxx index 2fe01bc5255c..8be9ee975178 100644 --- a/include/comphelper/servicehelper.hxx +++ b/include/comphelper/servicehelper.hxx @@ -73,11 +73,11 @@ inline bool isUnoTunnelId(const css::uno::Sequence< sal_Int8 >& rId) done by this macro. */ #define UNO3_GETIMPLEMENTATION_DECL( classname ) \ - static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw(); \ + static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() noexcept; \ virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; #define UNO3_GETIMPLEMENTATION_BASE_IMPL( classname ) \ -const css::uno::Sequence< sal_Int8 > & classname::getUnoTunnelId() throw() \ +const css::uno::Sequence< sal_Int8 > & classname::getUnoTunnelId() noexcept \ { \ static const UnoTunnelIdInit aId; \ return aId.getSeq(); \ diff --git a/include/comphelper/uno3.hxx b/include/comphelper/uno3.hxx index 36044ecd3114..97e4cea0a170 100644 --- a/include/comphelper/uno3.hxx +++ b/include/comphelper/uno3.hxx @@ -29,15 +29,15 @@ namespace comphelper /** used for declaring UNO3-Defaults, i.e. acquire/release */ #define DECLARE_UNO3_DEFAULTS(classname, baseclass) \ - virtual void SAL_CALL acquire() throw() override { baseclass::acquire(); } \ - virtual void SAL_CALL release() throw() override { baseclass::release(); } + virtual void SAL_CALL acquire() noexcept override { baseclass::acquire(); } \ + virtual void SAL_CALL release() noexcept override { baseclass::release(); } /** used for declaring UNO3-Defaults, i.e. acquire/release if you want to forward all queryInterfaces to the base class, (e.g. if you override queryAggregation) */ #define DECLARE_UNO3_AGG_DEFAULTS(classname, baseclass) \ - virtual void SAL_CALL acquire() throw() override { baseclass::acquire(); } \ - virtual void SAL_CALL release() throw() override { baseclass::release(); } \ + virtual void SAL_CALL acquire() noexcept override { baseclass::acquire(); } \ + virtual void SAL_CALL release() noexcept override { baseclass::release(); } \ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override \ { return baseclass::queryInterface(_rType); } @@ -64,8 +64,8 @@ namespace comphelper that would be ::cppu::WeakComponentImplHelperBase */ #define DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS(classname, baseclass, implhelper) \ - virtual void SAL_CALL acquire() throw() override { baseclass::acquire(); } \ - virtual void SAL_CALL release() throw() override { baseclass::release(); } \ + virtual void SAL_CALL acquire() noexcept override { baseclass::acquire(); } \ + virtual void SAL_CALL release() noexcept override { baseclass::release(); } \ virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) override \ { return baseclass::queryInterface(_rType); } \ virtual void SAL_CALL dispose() override \ @@ -89,12 +89,12 @@ namespace comphelper #define DECLARE_XINTERFACE( ) \ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) 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; #define IMPLEMENT_FORWARD_REFCOUNT( classname, refcountbase ) \ - void SAL_CALL classname::acquire() throw() { refcountbase::acquire(); } \ - void SAL_CALL classname::release() throw() { refcountbase::release(); } + void SAL_CALL classname::acquire() noexcept { refcountbase::acquire(); } \ + void SAL_CALL classname::release() noexcept { refcountbase::release(); } #define IMPLEMENT_FORWARD_XINTERFACE2( classname, refcountbase, baseclass2 ) \ IMPLEMENT_FORWARD_REFCOUNT( classname, refcountbase ) \ diff --git a/include/comphelper/weak.hxx b/include/comphelper/weak.hxx index f53ea8d7f562..28a23445dd53 100644 --- a/include/comphelper/weak.hxx +++ b/include/comphelper/weak.hxx @@ -46,9 +46,9 @@ public: OWeakTypeObject & operator =(OWeakTypeObject &&) = default; virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type & rType ) override; - virtual void SAL_CALL acquire() throw () override + virtual void SAL_CALL acquire() noexcept override { ::cppu::OWeakObject::acquire(); } - virtual void SAL_CALL release() throw () override + virtual void SAL_CALL release() noexcept override { ::cppu::OWeakObject::release(); } virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; |