cid#1555847 COPY_INSTEAD_OF_MOVE

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 <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2024-08-21 22:02:36 +01:00
parent 7e241c2bab
commit e1a4cdb356

View file

@ -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 ) );