From e1a4cdb3564c38ac1b75cc076c6762369e79137c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 21 Aug 2024 22:02:36 +0100 Subject: [PATCH] cid#1555847 COPY_INSTEAD_OF_MOVE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and cid#1555851 COPY_INSTEAD_OF_MOVE Change-Id: I826dbd7810398bf60be64702f11b912200f16b09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172226 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- cppu/source/uno/lbmap.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx index aea90a7eb760..a2a554b84cf6 100644 --- a/cppu/source/uno/lbmap.cxx +++ b/cppu/source/uno/lbmap.cxx @@ -67,8 +67,8 @@ public: { other._pMapping = nullptr; } inline ~Mapping(); inline Mapping & operator = ( uno_Mapping * pMapping ); - Mapping & operator = ( const Mapping & rMapping ) - { return operator = ( rMapping._pMapping ); } + // move variant is sufficient + Mapping & operator = ( const Mapping & rMapping ) = delete; Mapping & operator =(Mapping && other) noexcept { if (_pMapping != nullptr) { (*_pMapping->release)(_pMapping); @@ -554,10 +554,10 @@ static Mapping getMediateMapping( } else { - aUno2To = aAnUno2Uno; + aUno2To = std::move(aAnUno2Uno); // : ano_uno <-> to (i.e., uno) } - aUno = aAnUno; + aUno = std::move(aAnUno); } Mapping aFrom2Uno( getDirectMapping( rFrom, aUno ) );