pass-by-value in TaskManager::MyProperty::setValue

cheaper to move a temporary from some call-sites rather than
copy-construct

Change-Id: Ic1f994d0253c8368548295a08e83dfbbfae0a008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134307
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2022-05-13 11:11:16 +02:00
parent 8eabb8839d
commit 27be40762e
2 changed files with 3 additions and 3 deletions

View file

@ -46,9 +46,9 @@ inline const sal_Int16& TaskManager::MyProperty::getAttributes() const
{
return Attributes;
}
inline void TaskManager::MyProperty::setValue( const css::uno::Any& theValue ) const
inline void TaskManager::MyProperty::setValue( css::uno::Any theValue ) const
{
const_cast<MyProperty*>(this)->Value = theValue;
const_cast<MyProperty*>(this)->Value = std::move(theValue);
}
inline void TaskManager::MyProperty::setState( const css::beans::PropertyState& theState ) const
{

View file

@ -182,7 +182,7 @@ namespace fileaccess
inline const sal_Int16& getAttributes() const;
// The set* functions are declared const, because the key of "this" stays intact
inline void setValue( const css::uno::Any& theValue ) const;
inline void setValue( css::uno::Any theValue ) const;
inline void setState( const css::beans::PropertyState& theState ) const;
};