diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-05 10:43:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-05 15:56:52 +0200 |
commit | 057c60192aa34ae42f9f8abc2cb0ec93caa79130 (patch) | |
tree | d3187a9aa475ab2b7b57dd6f4a0293fd29e83ed0 /starmath/inc/token.hxx | |
parent | 6819707cbc8e7257a694623a6331c3c6f965fa94 (diff) |
clang-tidy modernize-pass-by-value in starmath
Change-Id: Ib6bd1ed629980d4ff122114bc45396886c94ab78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137842
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath/inc/token.hxx')
-rw-r--r-- | starmath/inc/token.hxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/starmath/inc/token.hxx b/starmath/inc/token.hxx index d3e141e5adb9..df026efbf30e 100644 --- a/starmath/inc/token.hxx +++ b/starmath/inc/token.hxx @@ -34,6 +34,7 @@ // std imports #include <memory> +#include <utility> // TokenGroups enum class TG @@ -182,15 +183,15 @@ struct SmColorTokenTableEntry { } - SmColorTokenTableEntry(const OUString& name, SmTokenType ctype, Color ncolor) - : aIdent(name) + SmColorTokenTableEntry(OUString name, SmTokenType ctype, Color ncolor) + : aIdent(std::move(name)) , eType(ctype) , cColor(ncolor) { } - SmColorTokenTableEntry(const OUString& name, SmTokenType ctype, sal_uInt32 ncolor) - : aIdent(name) + SmColorTokenTableEntry(OUString name, SmTokenType ctype, sal_uInt32 ncolor) + : aIdent(std::move(name)) , eType(ctype) , cColor(ColorTransparency, ncolor) { @@ -224,9 +225,9 @@ struct SmToken { } - SmToken(SmTokenType eTokenType, sal_Unicode cMath, const OUString& rText, - TG nTokenGroup = TG::NONE, sal_uInt16 nTokenLevel = 0) - : aText(rText) + SmToken(SmTokenType eTokenType, sal_Unicode cMath, OUString rText, TG nTokenGroup = TG::NONE, + sal_uInt16 nTokenLevel = 0) + : aText(std::move(rText)) , eType(eTokenType) , cMathChar(cMath) , nGroup(nTokenGroup) |