summaryrefslogtreecommitdiff
path: root/lingucomponent/source
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 /lingucomponent/source
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 'lingucomponent/source')
-rw-r--r--lingucomponent/source/languageguessing/guesslang.cxx12
-rw-r--r--lingucomponent/source/numbertext/numbertext.cxx4
2 files changed, 8 insertions, 8 deletions
diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx
index 98274af16d46..987642538f0e 100644
--- a/lingucomponent/source/languageguessing/guesslang.cxx
+++ b/lingucomponent/source/languageguessing/guesslang.cxx
@@ -161,7 +161,7 @@ Locale SAL_CALL LangGuess_Impl::guessPrimaryLanguage(
::sal_Int32 nStartPos,
::sal_Int32 nLen )
{
- std::lock_guard aGuard( GetLangGuessMutex() );
+ std::scoped_lock aGuard( GetLangGuessMutex() );
EnsureInitialized();
@@ -190,7 +190,7 @@ void LangGuess_Impl::SetFingerPrintsDB(
uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getAvailableLanguages( )
{
- std::lock_guard aGuard( GetLangGuessMutex() );
+ std::scoped_lock aGuard( GetLangGuessMutex() );
EnsureInitialized();
@@ -212,7 +212,7 @@ uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getAvailableLanguages( )
uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getEnabledLanguages( )
{
- std::lock_guard aGuard( GetLangGuessMutex() );
+ std::scoped_lock aGuard( GetLangGuessMutex() );
EnsureInitialized();
@@ -234,7 +234,7 @@ uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getEnabledLanguages( )
uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getDisabledLanguages( )
{
- std::lock_guard aGuard( GetLangGuessMutex() );
+ std::scoped_lock aGuard( GetLangGuessMutex() );
EnsureInitialized();
@@ -257,7 +257,7 @@ uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getDisabledLanguages( )
void SAL_CALL LangGuess_Impl::disableLanguages(
const uno::Sequence< Locale >& rLanguages )
{
- std::lock_guard aGuard( GetLangGuessMutex() );
+ std::scoped_lock aGuard( GetLangGuessMutex() );
EnsureInitialized();
@@ -278,7 +278,7 @@ void SAL_CALL LangGuess_Impl::disableLanguages(
void SAL_CALL LangGuess_Impl::enableLanguages(
const uno::Sequence< Locale >& rLanguages )
{
- std::lock_guard aGuard( GetLangGuessMutex() );
+ std::scoped_lock aGuard( GetLangGuessMutex() );
EnsureInitialized();
diff --git a/lingucomponent/source/numbertext/numbertext.cxx b/lingucomponent/source/numbertext/numbertext.cxx
index 5b9a32a65196..f878a55f591c 100644
--- a/lingucomponent/source/numbertext/numbertext.cxx
+++ b/lingucomponent/source/numbertext/numbertext.cxx
@@ -112,7 +112,7 @@ void NumberText_Impl::EnsureInitialized()
OUString SAL_CALL NumberText_Impl::getNumberText(const OUString& rText, const Locale& rLocale)
{
- std::lock_guard aGuard(GetNumberTextMutex());
+ std::scoped_lock aGuard(GetNumberTextMutex());
EnsureInitialized();
// libnumbertext supports Language + Country tags (separated by "_" or "-")
LanguageTag aLanguageTag(rLocale);
@@ -142,7 +142,7 @@ OUString SAL_CALL NumberText_Impl::getNumberText(const OUString& rText, const Lo
uno::Sequence<Locale> SAL_CALL NumberText_Impl::getAvailableLanguages()
{
- std::lock_guard aGuard(GetNumberTextMutex());
+ std::scoped_lock aGuard(GetNumberTextMutex());
// TODO
Sequence<css::lang::Locale> aRes;
return aRes;