diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-01-07 15:57:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-01-08 10:04:05 +0100 |
commit | 60150ef4b8fc1d0a30f20c3d9ed6ba0725da16a5 (patch) | |
tree | f88aff4014d4055b9a459676ad1f597556326de4 /UnoControls/source/controls/OConnectionPointHelper.cxx | |
parent | 08c4ed96cc94df4a3859aa167e92e6f6da9c2ce7 (diff) |
cid#1560054 use RVO
Change-Id: I04644c9ca78930d42289368b9a596f44a14b7012
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161746
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'UnoControls/source/controls/OConnectionPointHelper.cxx')
-rw-r--r-- | UnoControls/source/controls/OConnectionPointHelper.cxx | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/UnoControls/source/controls/OConnectionPointHelper.cxx b/UnoControls/source/controls/OConnectionPointHelper.cxx index b6ddaaa513a0..b17edc2ba3da 100644 --- a/UnoControls/source/controls/OConnectionPointHelper.cxx +++ b/UnoControls/source/controls/OConnectionPointHelper.cxx @@ -52,7 +52,6 @@ OConnectionPointHelper::~OConnectionPointHelper() } // XInterface - Any SAL_CALL OConnectionPointHelper::queryInterface( const Type& aType ) { // Attention: @@ -64,18 +63,15 @@ Any SAL_CALL OConnectionPointHelper::queryInterface( const Type& aType ) ) ); - // If searched interface not supported by this class ... - if ( !aReturn.hasValue() ) - { - // ... ask baseclasses. - aReturn = OWeakObject::queryInterface( aType ); - } + if (aReturn.hasValue()) + return aReturn; - return aReturn; + // If searched interface not supported by this class ... + // ... ask baseclasses. + return OWeakObject::queryInterface(aType); } // XInterface - void SAL_CALL OConnectionPointHelper::acquire() noexcept { // Attention: @@ -86,7 +82,6 @@ void SAL_CALL OConnectionPointHelper::acquire() noexcept } // XInterface - void SAL_CALL OConnectionPointHelper::release() noexcept { // Attention: |