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/progressmonitor.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/progressmonitor.cxx')
-rw-r--r-- | UnoControls/source/controls/progressmonitor.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
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 |