diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-06 21:40:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-07 20:09:58 +0200 |
commit | 86cadd43f002959d6cfcb7b3e4066076f6d05997 (patch) | |
tree | 45833a5083e69fe54d6298338245f27f16c17a69 /i18nlangtag | |
parent | 78b53fc86dcf97df9d00828788611527e78d40a6 (diff) |
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.cxx | 5 |
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) |