summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-23 07:50:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-23 11:48:22 +0200
commit51d1ec7883444e6216f1020122084d3a996c9ecb (patch)
tree8b24c91daecfa2ccb922b6e1c91e29c3bf89e7dc /i18npool
parentcd6dd8c6f3562cbccbc971b916c6a8933840ffeb (diff)
clang-tidy performance-unnecessary-copy-init in editeng..i18npool
Change-Id: I2ee2c8d15d8700cfaa1697363da4557c741a5f36 Reviewed-on: https://gerrit.libreoffice.org/62216 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/localedata/LocaleNode.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index ff384c394fcc..11d3f4bb070c 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -255,7 +255,7 @@ void LCInfoNode::generateCode (const OFileWriter &of) const
if (variantNode)
{
// If given Variant must be at least ll-Ssss and language must be 'qlt'
- OUString aVariant( variantNode->getValue());
+ const OUString& aVariant( variantNode->getValue());
if (!(aVariant.isEmpty() || (aVariant.getLength() >= 7 && aVariant.indexOf('-') >= 2)))
incErrorStr( "Error: invalid Variant '%s'\n", aVariant);
if (!(aVariant.isEmpty() || aLanguage == "qlt"))
@@ -693,7 +693,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
if (sTheCompatibleCurrency.isEmpty() &&
((nStart = n->getValue().indexOf("[$")) >= 0))
{
- OUString aCode( n->getValue());
+ const OUString& aCode( n->getValue());
sal_Int32 nHyphen = aCode.indexOf( '-', nStart);
if (nHyphen >= nStart + 3)
sTheCompatibleCurrency = aCode.copy( nStart + 2, nHyphen - nStart - 2);
@@ -709,7 +709,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
// and not parenthesized [C]###0;([C]###0) if not en_US.
if (strcmp( of.getLocale(), "en_US") != 0)
{
- OUString aCode( n->getValue());
+ const OUString& aCode( n->getValue());
OUString const aPar1( "0)");
OUString const aPar2( "-)" );
OUString const aPar3( " )" );
@@ -721,7 +721,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
// Check if we have replaceTo for "[CURRENCY]" placeholder.
if (sTheCurrencyReplaceTo.isEmpty())
{
- OUString aCode( n->getValue());
+ const OUString& aCode( n->getValue());
if (aCode.indexOf( "[CURRENCY]" ) >= 0)
incErrorInt( "Error: [CURRENCY] replaceTo not found for formatindex=\"%d\".\n", formatindex);
}
@@ -730,7 +730,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
if (aUsage == "SCIENTIFIC_NUMBER")
{
// Check for presence of ##0.00E+00
- OUString aCode( n->getValue());
+ const OUString& aCode( n->getValue());
// Simple check without decimal separator (assumed to
// be one UTF-16 character). May be prefixed with
// [NatNum1] or other tags.
@@ -744,7 +744,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
if (pCtype)
{
int nSavErr = nError;
- OUString aCode( n->getValue());
+ const OUString& aCode( n->getValue());
if (formatindex == cssi::NumberFormatIndex::NUMBER_1000DEC2)
{
sal_Int32 nDec = -1;