summaryrefslogtreecommitdiffstats
path: root/i18nlangtag
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-06 21:40:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-07 20:09:58 +0200
commit86cadd43f002959d6cfcb7b3e4066076f6d05997 (patch)
tree45833a5083e69fe54d6298338245f27f16c17a69 /i18nlangtag
parentlok: add "MacroSecurityLevel" option (diff)
downloadcore-86cadd43f002959d6cfcb7b3e4066076f6d05997.tar.gz
core-86cadd43f002959d6cfcb7b3e4066076f6d05997.zip
rtl::Static -> function local static
Change-Id: Iee030633d2e2b020f38797d0d323680fa552b81a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113713 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18nlangtag')
-rw-r--r--i18nlangtag/source/languagetag/languagetag.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 850e404e363c..a5a5dea7d0af 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -51,7 +51,6 @@ struct myLtError
// "statics" to be returned as const reference to an empty locale and string.
struct theEmptyLocale : public rtl::Static< lang::Locale, theEmptyLocale > {};
-struct theEmptyBcp47 : public rtl::Static< OUString, theEmptyBcp47 > {};
}
typedef std::unordered_set< OUString > KnownTagSet;
@@ -1561,8 +1560,10 @@ const OUString & LanguageTagImpl::getBcp47() const
const OUString & LanguageTag::getBcp47( bool bResolveSystem ) const
{
+ static const OUString theEmptyBcp47 = u"";
+
if (!bResolveSystem && mbSystemLocale)
- return theEmptyBcp47::get();
+ return theEmptyBcp47;
if (!mbInitializedBcp47)
syncVarsFromImpl();
if (!mbInitializedBcp47)