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/progressmonitor.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'UnoControls/source/controls/progressmonitor.cxx') diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index 7df767760323..d58518e0e8ff 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -121,14 +121,12 @@ Any SAL_CALL ProgressMonitor::queryInterface( const Type& rType ) ) ); - // If searched interface not supported by this class ... - if ( !aReturn.hasValue() ) - { - // ... ask baseclasses. - aReturn = BaseControl::queryInterface( rType ); - } + if (aReturn.hasValue()) + return aReturn; - return aReturn; + // If searched interface not supported by this class ... + // ... ask baseclasses. + return BaseControl::queryInterface(rType); } // XInterface -- cgit