use std::move to avoid some object allocation

Change-Id: Id37b54810e7755bd7a4e354c777e0cfdf069080f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134801
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2022-05-23 11:03:53 +02:00
parent 728ff63903
commit d850510bae

View file

@ -208,7 +208,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
// so it's either a simple property or a complex property in one single UNO struct
if( pItem->PutValue( rProp.Value, bConvertTwips ? CONVERT_TWIPS : 0 ) )
// only use successfully converted items
rSet.Put( *pItem );
rSet.Put( std::move(pItem) );
else
{
SAL_WARN( "sfx", "Property not convertible: " << pSlot->pUnoName );
@ -304,7 +304,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
#endif
if( pItem->PutValue( pProp->Value, 0 ) )
// only use successfully converted items
rSet.Put( *pItem );
rSet.Put( std::move(pItem) );
else
{
SAL_WARN( "sfx", "Property not convertible: " << rArg.pName );
@ -326,7 +326,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
#endif
if( pItem->PutValue( rProp.Value, 0 ) )
// only use successfully converted items
rSet.Put( *pItem );
rSet.Put( std::move(pItem) );
else
{
SAL_WARN( "sfx", "Property not convertible: " << rArg.pName );