From 60150ef4b8fc1d0a30f20c3d9ed6ba0725da16a5 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 7 Jan 2024 15:57:43 +0000 Subject: cid#1560054 use RVO MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I04644c9ca78930d42289368b9a596f44a14b7012 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161746 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- UnoControls/source/controls/OConnectionPointHelper.cxx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'UnoControls/source/controls/OConnectionPointHelper.cxx') 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: -- cgit