summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-02-16 13:05:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-02-17 08:59:01 +0100
commit6be9ae8aa1d3b164f3953dbc1cb7f0f1c1976d9b (patch)
tree244d93b2f30894d9367aae54d76b962e53a165f2 /include
parentea0701aab307a549cf6cad1d309cab1bf11ef436 (diff)
inline some acquire/release calls
because these are all on the hot path, and in the best case, with enough inlining, the compiler can skip the call altogether and just do a locked CMPXHG instruction Change-Id: I099d6385f602e40e1767f9f1002b7514ecf436e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88775 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/comphelper/weak.hxx7
-rw-r--r--include/sfx2/sfxbasemodel.hxx6
-rw-r--r--include/svx/unomodel.hxx6
-rw-r--r--include/svx/unopool.hxx6
-rw-r--r--include/svx/unoshape.hxx42
-rw-r--r--include/ucbhelper/contenthelper.hxx7
-rw-r--r--include/ucbhelper/interactionrequest.hxx56
-rw-r--r--include/unotools/streamwrap.hxx6
8 files changed, 80 insertions, 56 deletions
diff --git a/include/comphelper/weak.hxx b/include/comphelper/weak.hxx
index f094225cb32c..f53ea8d7f562 100644
--- a/include/comphelper/weak.hxx
+++ b/include/comphelper/weak.hxx
@@ -46,8 +46,11 @@ 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 release() throw () override;
+ virtual void SAL_CALL acquire() throw () override
+ { ::cppu::OWeakObject::acquire(); }
+ virtual void SAL_CALL release() throw () override
+ { ::cppu::OWeakObject::release(); }
+
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getImplementationId( ) override;
diff --git a/include/sfx2/sfxbasemodel.hxx b/include/sfx2/sfxbasemodel.hxx
index 3dbdb80c3aff..5ee900b8d852 100644
--- a/include/sfx2/sfxbasemodel.hxx
+++ b/include/sfx2/sfxbasemodel.hxx
@@ -191,7 +191,8 @@ public:
@onerror A RuntimeException is thrown.
*/
- virtual void SAL_CALL acquire() throw() override ;
+ virtual void SAL_CALL acquire() throw() override
+ { OWeakObject::acquire(); }
/**___________________________________________________________________________________________________
@short decrement refcount
@@ -200,7 +201,8 @@ public:
@onerror A RuntimeException is thrown.
*/
- virtual void SAL_CALL release() throw() override ;
+ virtual void SAL_CALL release() throw() override
+ { OWeakObject::release(); }
// XTypeProvider
diff --git a/include/svx/unomodel.hxx b/include/svx/unomodel.hxx
index efbc5d7ba4e6..08b910ca83ec 100644
--- a/include/svx/unomodel.hxx
+++ b/include/svx/unomodel.hxx
@@ -67,8 +67,10 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire() throw() override;
- virtual void SAL_CALL release() throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { SfxBaseModel::acquire(); }
+ virtual void SAL_CALL release() throw() override
+ { SfxBaseModel::release(); }
// XModel
virtual void SAL_CALL lockControllers( ) override;
diff --git a/include/svx/unopool.hxx b/include/svx/unopool.hxx
index f7738f3fc5c1..b8cc1c7d41f3 100644
--- a/include/svx/unopool.hxx
+++ b/include/svx/unopool.hxx
@@ -63,8 +63,10 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire() throw() override;
- virtual void SAL_CALL release() throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { OWeakAggObject::acquire(); }
+ virtual void SAL_CALL release() throw() override
+ { OWeakAggObject::release(); }
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx
index eb0333468046..7c6b60291886 100644
--- a/include/svx/unoshape.hxx
+++ b/include/svx/unoshape.hxx
@@ -376,8 +376,10 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire() throw() override;
- virtual void SAL_CALL release() throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { SvxShape::acquire(); }
+ virtual void SAL_CALL release() throw() override
+ { SvxShape::release(); }
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
@@ -407,8 +409,10 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire() throw() override;
- virtual void SAL_CALL release() throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { OWeakAggObject::acquire(); }
+ virtual void SAL_CALL release() throw() override
+ { OWeakAggObject::release(); }
// XServiceInfo
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
@@ -436,8 +440,10 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire() throw() override;
- virtual void SAL_CALL release() throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { SvxShape::acquire(); }
+ virtual void SAL_CALL release() throw() override
+ { SvxShape::release(); }
// XShapes
virtual void SAL_CALL add( const css::uno::Reference< css::drawing::XShape >& xShape ) override;
@@ -485,8 +491,10 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire() throw() override;
- virtual void SAL_CALL release() throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { SvxShapeText::acquire(); }
+ virtual void SAL_CALL release() throw() override
+ { SvxShapeText::release(); }
// XShapeDescriptor
virtual OUString SAL_CALL getShapeType() override;
@@ -524,8 +532,10 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire() throw() override;
- virtual void SAL_CALL release() throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { SvxShapeText::acquire(); }
+ virtual void SAL_CALL release() throw() override
+ { SvxShapeText::release(); }
// XPropertySet
virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
@@ -671,8 +681,10 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire() throw() override;
- virtual void SAL_CALL release() throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { SvxShape::acquire(); }
+ virtual void SAL_CALL release() throw() override
+ { SvxShape::release(); }
// XShapes
virtual void SAL_CALL add( const css::uno::Reference< css::drawing::XShape >& xShape ) override;
@@ -804,8 +816,10 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire() throw() override;
- virtual void SAL_CALL release() throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { SvxShapeText::acquire(); }
+ virtual void SAL_CALL release() throw() override
+ { SvxShapeText::release(); }
// XShape
virtual css::awt::Point SAL_CALL getPosition() override;
diff --git a/include/ucbhelper/contenthelper.hxx b/include/ucbhelper/contenthelper.hxx
index 957ff4353b7e..76a2e290b497 100644
--- a/include/ucbhelper/contenthelper.hxx
+++ b/include/ucbhelper/contenthelper.hxx
@@ -308,10 +308,9 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire()
- throw() override;
- virtual void SAL_CALL release()
- throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { cppu::OWeakObject::acquire(); }
+ virtual void SAL_CALL release() throw() override;
// XTypeProvider
virtual css::uno::Sequence< sal_Int8 > SAL_CALL
diff --git a/include/ucbhelper/interactionrequest.hxx b/include/ucbhelper/interactionrequest.hxx
index e7f56c7ffcf6..b7f40c8f176f 100644
--- a/include/ucbhelper/interactionrequest.hxx
+++ b/include/ucbhelper/interactionrequest.hxx
@@ -166,10 +166,10 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire()
- throw() override;
- virtual void SAL_CALL release()
- throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { OWeakObject::acquire(); }
+ virtual void SAL_CALL release() throw() override
+ { OWeakObject::release(); }
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL
@@ -199,10 +199,10 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire()
- throw() override;
- virtual void SAL_CALL release()
- throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { OWeakObject::acquire(); }
+ virtual void SAL_CALL release() throw() override
+ { OWeakObject::release(); }
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL
@@ -232,10 +232,10 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire()
- throw() override;
- virtual void SAL_CALL release()
- throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { OWeakObject::acquire(); }
+ virtual void SAL_CALL release() throw() override
+ { OWeakObject::release(); }
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL
@@ -265,10 +265,10 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire()
- throw() override;
- virtual void SAL_CALL release()
- throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { OWeakObject::acquire(); }
+ virtual void SAL_CALL release() throw() override
+ { OWeakObject::release(); }
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL
@@ -357,10 +357,10 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire()
- throw() override;
- virtual void SAL_CALL release()
- throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { OWeakObject::acquire(); }
+ virtual void SAL_CALL release() throw() override
+ { OWeakObject::release(); }
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL
@@ -494,10 +494,10 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire()
- throw() override;
- virtual void SAL_CALL release()
- throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { OWeakObject::acquire(); }
+ virtual void SAL_CALL release() throw() override
+ { OWeakObject::release(); }
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL
@@ -522,10 +522,10 @@ public:
// XInterface
virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire()
- throw() override;
- virtual void SAL_CALL release()
- throw() override;
+ virtual void SAL_CALL acquire() throw() override
+ { OWeakObject::acquire(); }
+ virtual void SAL_CALL release() throw() override
+ { OWeakObject::release(); }
// XInteractionContinuation
virtual void SAL_CALL select() override;
diff --git a/include/unotools/streamwrap.hxx b/include/unotools/streamwrap.hxx
index 7900c93b4c39..363c0d69dcea 100644
--- a/include/unotools/streamwrap.hxx
+++ b/include/unotools/streamwrap.hxx
@@ -134,8 +134,10 @@ private:
// disambiguate XInterface
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& _rType ) override;
- virtual void SAL_CALL acquire( ) throw () override;
- virtual void SAL_CALL release( ) throw () override;
+ virtual void SAL_CALL acquire( ) throw () override
+ { OOutputStreamWrapper::acquire(); }
+ virtual void SAL_CALL release( ) throw () override
+ { OOutputStreamWrapper::release(); }
// XSeekable
virtual void SAL_CALL seek( sal_Int64 _nLocation ) override;