diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-09 08:36:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-10 13:13:15 +0200 |
commit | f71606c920a3f78294da745cd9ef1eacde010224 (patch) | |
tree | b808351112a9b13fb775f7794d18b0cb8b6e1645 /lingucomponent | |
parent | b28de9d32016a904e4ba457a9a6c62098416c729 (diff) |
new loplugin:moveit
look for local variables that can be std::move'd to parameters
off by default, since it doesn't do proper data flow analysis
Change-Id: I3403a0fcffd165bdea6a772528bc53995c5fdb40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135527
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lingucomponent')
-rw-r--r-- | lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx | 2 | ||||
-rw-r--r-- | lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx index 9ccc1210956a..8ac156ef8cb3 100644 --- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx @@ -177,7 +177,7 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales() mvDicts[k].aPtr = nullptr; mvDicts[k].eEnc = RTL_TEXTENCODING_DONTKNOW; mvDicts[k].aLoc = aLanguageTag.getLocale(); - mvDicts[k].apCC.reset( new CharClass( aLanguageTag ) ); + mvDicts[k].apCC.reset( new CharClass( std::move(aLanguageTag) ) ); // also both files have to be in the same directory and the // file names must only differ in the extension (.aff/.dic). // Thus we use the first location only and strip the extension part. diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index ca29cca2ac52..ea3e3af8ddc1 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -175,7 +175,7 @@ Sequence< Locale > SAL_CALL Thesaurus::getLocales() LanguageTag aLanguageTag(rLocaleName); mvThesInfo[k].aEncoding = RTL_TEXTENCODING_DONTKNOW; mvThesInfo[k].aLocale = aLanguageTag.getLocale(); - mvThesInfo[k].aCharSetInfo.reset( new CharClass( aLanguageTag ) ); + mvThesInfo[k].aCharSetInfo.reset( new CharClass( std::move(aLanguageTag) ) ); // also both files have to be in the same directory and the // file names must only differ in the extension (.aff/.dic). // Thus we use the first location only and strip the extension part. |