summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-23 07:54:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-23 10:29:38 +0200
commitedc85fb55f8adc30a1416c6c854c89097060fb21 (patch)
treedaf9701247beee33cdb6af9d0486d1ba9a0932f7 /l10ntools
parent86cce1343ca5ed85eece1c9d065f9f861d57f9d9 (diff)
clang-tidy performance-unnecessary-copy-init in idl..reportdesign
Change-Id: I4b2eda375bbfe1ba35a45168515d885935adcb76 Reviewed-on: https://gerrit.libreoffice.org/62217 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/pocheck.cxx6
-rw-r--r--l10ntools/source/xrmmerge.cxx9
2 files changed, 7 insertions, 8 deletions
diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx
index 4f7c7686757a..49aa9551c3fb 100644
--- a/l10ntools/source/pocheck.cxx
+++ b/l10ntools/source/pocheck.cxx
@@ -45,7 +45,7 @@ static void checkStyleNames(const OString& aLanguage)
if( !aPoEntry.isFuzzy() && aPoEntry.getMsgCtxt().startsWith("STR_POOLCOLL") )
{
- OString aMsgStr = aPoEntry.getMsgStr();
+ const OString& aMsgStr = aPoEntry.getMsgStr();
if( aMsgStr.isEmpty() )
continue;
if( aLocalizedStyleNames.find(aMsgStr) == aLocalizedStyleNames.end() )
@@ -57,7 +57,7 @@ static void checkStyleNames(const OString& aLanguage)
}
if( !aPoEntry.isFuzzy() && aPoEntry.getMsgCtxt().startsWith("STR_POOLNUMRULE") )
{
- OString aMsgStr = aPoEntry.getMsgStr();
+ const OString& aMsgStr = aPoEntry.getMsgStr();
if( aMsgStr.isEmpty() )
continue;
if( aLocalizedNumStyleNames.find(aMsgStr) == aLocalizedNumStyleNames.end() )
@@ -163,7 +163,7 @@ static void checkFunctionNames(const OString& aLanguage)
break;
if( !aPoEntry.isFuzzy() && aPoEntry.getMsgCtxt() == "RID_STRLIST_FUNCTION_NAMES" )
{
- OString aMsgStr = aPoEntry.getMsgStr();
+ const OString& aMsgStr = aPoEntry.getMsgStr();
if( aMsgStr.isEmpty() )
continue;
if( aLocalizedCoreFunctionNames.find(aMsgStr) == aLocalizedCoreFunctionNames.end() )
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 45899a4995d4..ee45efe8b1a1 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -405,12 +405,11 @@ void XRMResMerge::WorkOnDesc(
OString sDescFilename = GetAttribute ( rOpenTag, "xlink:href" );
for( size_t n = 0; n < aLanguages.size(); n++ ){
sCur = aLanguages[ n ];
- OString sContent;
+ OString sText;
if ( !sCur.equalsIgnoreAsciiCase("en-US") &&
- ( pEntrys->GetText( sContent, sCur, true )) &&
- !sContent.isEmpty())
+ ( pEntrys->GetText( sText, sCur, true )) &&
+ !sText.isEmpty())
{
- OString sText( sContent );
OString sAdditionalLine( "\n " );
sAdditionalLine += rOpenTag;
OString sSearch = sLangAttribute;
@@ -498,7 +497,7 @@ void XRMResMerge::EndOfText(
!sContent.isEmpty() &&
helper::isWellFormedXML( sContent ))
{
- OString sText( sContent );
+ const OString& sText( sContent );
OString sAdditionalLine( "\n " );
sAdditionalLine += rOpenTag;
OString sSearch = sLangAttribute;