From f71606c920a3f78294da745cd9ef1eacde010224 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 9 Jun 2022 08:36:33 +0200 Subject: 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 --- lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx | 2 +- lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lingucomponent') 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. -- cgit