summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-18 14:54:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-19 09:30:40 +0200
commit60addb6e864e1e8eb6c4ea7bb5be04a94a1ea7fb (patch)
tree2a30236845bff00248caf9b9378633981a5659c7 /include
parent8bfdbf5b7474596fe1d7d3318920c9a36f630201 (diff)
clang-tidy modernize-pass-by-value in i18nutil
Change-Id: Ia0457c81ee1da2a88a8238a1a1d65354c1b639bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134533 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/i18nlangtag/mslangid.hxx3
-rw-r--r--include/i18nutil/searchopt.hxx11
2 files changed, 8 insertions, 6 deletions
diff --git a/include/i18nlangtag/mslangid.hxx b/include/i18nlangtag/mslangid.hxx
index cb2e244556b1..1d2f5cc8c651 100644
--- a/include/i18nlangtag/mslangid.hxx
+++ b/include/i18nlangtag/mslangid.hxx
@@ -27,6 +27,7 @@
#include <com/sun/star/lang/Locale.hpp>
#include <string_view>
+#include <utility>
#include <vector>
struct IsoLanguageCountryEntry;
@@ -221,7 +222,7 @@ public:
OUString maBcp47;
LanguageType mnLang;
- LanguagetagMapping( const OUString & rBcp47, LanguageType nLang ) : maBcp47(rBcp47), mnLang(nLang) {}
+ LanguagetagMapping( OUString aBcp47, LanguageType nLang ) : maBcp47(std::move(aBcp47)), mnLang(nLang) {}
};
/** @internal - Obtain a list of known locales (i.e. those that have a
diff --git a/include/i18nutil/searchopt.hxx b/include/i18nutil/searchopt.hxx
index 817014af8d96..c215da0d296f 100644
--- a/include/i18nutil/searchopt.hxx
+++ b/include/i18nutil/searchopt.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/util/SearchAlgorithms.hpp>
#include <com/sun/star/util/SearchOptions2.hpp>
#include <i18nutil/transliteration.hxx>
+#include <utility>
namespace i18nutil
{
@@ -68,15 +69,15 @@ struct SAL_WARN_UNUSED SearchOptions {
}
SearchOptions(const css::util::SearchAlgorithms& algorithmType_, const sal_Int32 searchFlag_,
- const OUString& searchString_, const OUString& replaceString_,
- const css::lang::Locale& Locale_,
+ OUString searchString_, OUString replaceString_,
+ css::lang::Locale Locale_,
const sal_Int32 changedChars_, const sal_Int32 deletedChars_, const sal_Int32 insertedChars_,
const TransliterationFlags& transliterateFlags_)
: algorithmType(algorithmType_)
, searchFlag(searchFlag_)
- , searchString(searchString_)
- , replaceString(replaceString_)
- , Locale(Locale_)
+ , searchString(std::move(searchString_))
+ , replaceString(std::move(replaceString_))
+ , Locale(std::move(Locale_))
, changedChars(changedChars_)
, deletedChars(deletedChars_)
, insertedChars(insertedChars_)