ucb/source/ucp/file/filinl.hxx | 4 ++-- ucb/source/ucp/file/filtask.hxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit 27be40762e9e10de05cdc0692eef8a8c6fd5a23c Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri May 13 11:11:16 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat May 14 14:44:14 2022 +0200 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.gran...@collabora.co.uk> diff --git a/ucb/source/ucp/file/filinl.hxx b/ucb/source/ucp/file/filinl.hxx index b29d938def1c..3ea985ebc6cd 100644 --- a/ucb/source/ucp/file/filinl.hxx +++ b/ucb/source/ucp/file/filinl.hxx @@ -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 { diff --git a/ucb/source/ucp/file/filtask.hxx b/ucb/source/ucp/file/filtask.hxx index f8d070a4f36d..3fa4b85752ed 100644 --- a/ucb/source/ucp/file/filtask.hxx +++ b/ucb/source/ucp/file/filtask.hxx @@ -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; };