summaryrefslogtreecommitdiff
path: root/formula/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-22 09:00:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-23 09:58:23 +0200
commit26fbf6eef19e2746c28d2f1584505d5e10a295cc (patch)
treedb5b1e8040e57f6125b5fed6532623c2e50b549d /formula/source
parenta95c585433246813096e8890b7ed6ef4fe30c621 (diff)
clang-tidy modernize-pass-by-value in formula
Change-Id: I275f96bb8b24838538ac88532508ad7dbd127eae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136271 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'formula/source')
-rw-r--r--formula/source/core/api/token.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 9a22d9cd2205..04078302efa1 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -33,6 +33,7 @@
#include <formula/compiler.hxx>
#include <svl/sharedstringpool.hxx>
#include <memory>
+#include <utility>
namespace formula
{
@@ -1933,8 +1934,8 @@ bool FormulaTypedDoubleToken::operator==( const FormulaToken& r ) const
return FormulaDoubleToken::operator==( r ) && mnType == r.GetDoubleType();
}
-FormulaStringToken::FormulaStringToken( const svl::SharedString& r ) :
- FormulaToken( svString ), maString( r )
+FormulaStringToken::FormulaStringToken( svl::SharedString r ) :
+ FormulaToken( svString ), maString(std::move( r ))
{
}
@@ -1961,8 +1962,8 @@ bool FormulaStringToken::operator==( const FormulaToken& r ) const
return FormulaToken::operator==( r ) && maString == r.GetString();
}
-FormulaStringOpToken::FormulaStringOpToken( OpCode e, const svl::SharedString& r ) :
- FormulaByteToken( e, 0, svString, ParamClass::Unknown ), maString( r ) {}
+FormulaStringOpToken::FormulaStringOpToken( OpCode e, svl::SharedString r ) :
+ FormulaByteToken( e, 0, svString, ParamClass::Unknown ), maString(std::move( r )) {}
FormulaStringOpToken::FormulaStringOpToken( const FormulaStringOpToken& r ) :
FormulaByteToken( r ), maString( r.maString ) {}