summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/nativenumber/nativenumbersupplier.cxx4
-rw-r--r--i18npool/source/numberformatcode/numberformatcode.cxx8
2 files changed, 6 insertions, 6 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
diff --git a/i18npool/source/numberformatcode/numberformatcode.cxx b/i18npool/source/numberformatcode/numberformatcode.cxx
index 0e76f087b02f..c20ed5b20edc 100644
--- a/i18npool/source/numberformatcode/numberformatcode.cxx
+++ b/i18npool/source/numberformatcode/numberformatcode.cxx
@@ -43,7 +43,7 @@ NumberFormatCodeMapper::getDefault( sal_Int16 formatType, sal_Int16 formatUsage,
OUString elementType = mapElementTypeShortToString(formatType);
OUString elementUsage = mapElementUsageShortToString(formatUsage);
- std::lock_guard g(maMutex);
+ std::scoped_lock g(maMutex);
const css::uno::Sequence< css::i18n::FormatElement > &aFormatSeq = getFormats( rLocale );
auto pFormat = std::find_if(aFormatSeq.begin(), aFormatSeq.end(),
@@ -67,7 +67,7 @@ NumberFormatCodeMapper::getDefault( sal_Int16 formatType, sal_Int16 formatUsage,
css::i18n::NumberFormatCode SAL_CALL
NumberFormatCodeMapper::getFormatCode( sal_Int16 formatIndex, const css::lang::Locale& rLocale )
{
- std::lock_guard g(maMutex);
+ std::scoped_lock g(maMutex);
const css::uno::Sequence< css::i18n::FormatElement > &aFormatSeq = getFormats( rLocale );
auto pFormat = std::find_if(aFormatSeq.begin(), aFormatSeq.end(),
@@ -88,7 +88,7 @@ NumberFormatCodeMapper::getFormatCode( sal_Int16 formatIndex, const css::lang::L
css::uno::Sequence< css::i18n::NumberFormatCode > SAL_CALL
NumberFormatCodeMapper::getAllFormatCode( sal_Int16 formatUsage, const css::lang::Locale& rLocale )
{
- std::lock_guard g(maMutex);
+ std::scoped_lock g(maMutex);
const css::uno::Sequence< css::i18n::FormatElement > &aFormatSeq = getFormats( rLocale );
std::vector<css::i18n::NumberFormatCode> aVec;
@@ -113,7 +113,7 @@ NumberFormatCodeMapper::getAllFormatCode( sal_Int16 formatUsage, const css::lang
css::uno::Sequence< css::i18n::NumberFormatCode > SAL_CALL
NumberFormatCodeMapper::getAllFormatCodes( const css::lang::Locale& rLocale )
{
- std::lock_guard g(maMutex);
+ std::scoped_lock g(maMutex);
const css::uno::Sequence< css::i18n::FormatElement > &aFormatSeq = getFormats( rLocale );
std::vector<css::i18n::NumberFormatCode> aVec;