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:
parent
8eabb8839d
commit
27be40762e
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue