diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-23 16:07:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-27 14:07:56 +0200 |
commit | c7c6f0af6c836ebe0968967a1e7c8320b0ac17d6 (patch) | |
tree | 4bc5b2fa623b9765b88bbfe7de10a7590c87d5c8 /i18nlangtag/source | |
parent | 99482297c7dd497e41fad2e7193759043e305101 (diff) |
loplugin:stringadd convert chained append to +
which can use the more efficient *StringConcat
Also fix a crash in stringview plugin which
started happening while I working on this.
Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18nlangtag/source')
-rw-r--r-- | i18nlangtag/source/languagetag/languagetag.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx index acdb3374b6ff..41f23973020f 100644 --- a/i18nlangtag/source/languagetag/languagetag.cxx +++ b/i18nlangtag/source/languagetag/languagetag.cxx @@ -1115,11 +1115,11 @@ bool LanguageTagImpl::canonicalize() 1 + aCountry.getLength() + 1 + aVariants.getLength()); aBuf.append( aLanguage); if (!aScript.isEmpty()) - aBuf.append("-").append(aScript); + aBuf.append("-" + aScript); if (!aCountry.isEmpty()) - aBuf.append("-").append(aCountry); + aBuf.append("-" + aCountry); if (!aVariants.isEmpty()) - aBuf.append("-").append(aVariants); + aBuf.append("-" + aVariants); OUString aStr( aBuf.makeStringAndClear()); if (maBcp47 != aStr) |