summaryrefslogtreecommitdiff
path: root/i18npool/source/nativenumber/nativenumbersupplier.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-03 11:36:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-03 12:20:53 +0200
commit05ab38359ae72f2a54dc0b5f1b84ac5f649c507a (patch)
tree5830c7ee2442984e0bc804def7bd95ddd8a25410 /i18npool/source/nativenumber/nativenumbersupplier.cxx
parent5afdcad4c0e7850b18996c549892b9360cd8973f (diff)
Consolidate on C++17 std::scoped_lock instead of std::lock_guard
as in commit 9376f65a26240441bf9dd6ae1f69886dc9fa60fa Change-Id: I3ad9afd4d113582a214a4a4bc7eea55e38cd6ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119927 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool/source/nativenumber/nativenumbersupplier.cxx')
-rw-r--r--i18npool/source/nativenumber/nativenumbersupplier.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index b337fc50f2c6..8e2f9128a685 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -554,7 +554,7 @@ struct Separators
Separators getLocaleSeparators(const Locale& rLocale, const OUString& rLocStr)
{
// Guard the static variable below.
- std::lock_guard aGuard(theNatNumMutex);
+ std::scoped_lock aGuard(theNatNumMutex);
// Maximum a couple hundred of pairs with 4-byte structs - so no need for smart managing
static std::unordered_map<OUString, Separators> aLocaleSeparatorsBuf;
auto it = aLocaleSeparatorsBuf.find(rLocStr);
@@ -603,7 +603,7 @@ OUString getNumberText(const Locale& rLocale, const OUString& rNumberString,
= css::linguistic2::NumberText::create(comphelper::getProcessComponentContext());
// Guard the static variables below.
- std::lock_guard aGuard( theNatNumMutex );
+ std::scoped_lock aGuard( theNatNumMutex );
OUString numbertext_prefix;
// default "cardinal" gets empty prefix