summaryrefslogtreecommitdiff
path: root/ucb/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-13 11:11:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-14 14:44:14 +0200
commit27be40762e9e10de05cdc0692eef8a8c6fd5a23c (patch)
treecee31dbe5082a69271d7668f52e2612b660477e9 /ucb/source
parent8eabb8839dd81a1055aa0416ab5f3f67c7d3bb29 (diff)
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>
Diffstat (limited to 'ucb/source')
-rw-r--r--ucb/source/ucp/file/filinl.hxx4
-rw-r--r--ucb/source/ucp/file/filtask.hxx2
2 files changed, 3 insertions, 3 deletions
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;
};