From 4c91b89d8ce9c34179f31854dc88bd0a9fa84cba Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 28 Aug 2018 15:09:33 +0200 Subject: new loplugin:oustringbuffer look for places where we are appending the temporary result of adding strings together, to an OUStringBuffer, where we could rather call append repeatedly and avoid the temporary creation Change-Id: I481435124291ac7fb54b91a78344a9fe5b379a82 Reviewed-on: https://gerrit.libreoffice.org/59708 Tested-by: Jenkins Reviewed-by: Noel Grandin --- i18nlangtag/source/languagetag/languagetag.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'i18nlangtag/source/languagetag/languagetag.cxx') diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx index 9809edef6777..ed768a907303 100644 --- a/i18nlangtag/source/languagetag/languagetag.cxx +++ b/i18nlangtag/source/languagetag/languagetag.cxx @@ -1097,11 +1097,11 @@ bool LanguageTagImpl::canonicalize() 1 + aCountry.getLength() + 1 + aVariants.getLength()); aBuf.append( aLanguage); if (!aScript.isEmpty()) - aBuf.append("-" + aScript); + aBuf.append("-").append(aScript); if (!aCountry.isEmpty()) - aBuf.append("-" + aCountry); + aBuf.append("-").append(aCountry); if (!aVariants.isEmpty()) - aBuf.append("-" + aVariants); + aBuf.append("-").append(aVariants); OUString aStr( aBuf.makeStringAndClear()); if (maBcp47 != aStr) -- cgit