summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-30 15:31:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-31 14:24:40 +0200
commite81be03d9f2c952da0516be0f42fd2dbe6f6d4a4 (patch)
tree97b7712540369a688a91fe222f90234d6df7be80 /lingucomponent
parent8adf13fe66e1bdc30e3390f59c9fb33269f4b9dc (diff)
osl::Mutex->std::mutex in LangGuess_Impl
Change-Id: If2ea21cd52ddae821598398524c84b5b22817c33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119729 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lingucomponent')
-rw-r--r--lingucomponent/source/languageguessing/guesslang.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx
index dfece0efe4e5..98274af16d46 100644
--- a/lingucomponent/source/languageguessing/guesslang.cxx
+++ b/lingucomponent/source/languageguessing/guesslang.cxx
@@ -18,6 +18,7 @@
*/
#include <iostream>
+#include <mutex>
#include <string_view>
#include <osl/file.hxx>
@@ -54,9 +55,9 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::linguistic2;
-static osl::Mutex & GetLangGuessMutex()
+static std::mutex & GetLangGuessMutex()
{
- static osl::Mutex aMutex;
+ static std::mutex aMutex;
return aMutex;
}
@@ -160,7 +161,7 @@ Locale SAL_CALL LangGuess_Impl::guessPrimaryLanguage(
::sal_Int32 nStartPos,
::sal_Int32 nLen )
{
- osl::MutexGuard aGuard( GetLangGuessMutex() );
+ std::lock_guard aGuard( GetLangGuessMutex() );
EnsureInitialized();
@@ -189,7 +190,7 @@ void LangGuess_Impl::SetFingerPrintsDB(
uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getAvailableLanguages( )
{
- osl::MutexGuard aGuard( GetLangGuessMutex() );
+ std::lock_guard aGuard( GetLangGuessMutex() );
EnsureInitialized();
@@ -211,7 +212,7 @@ uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getAvailableLanguages( )
uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getEnabledLanguages( )
{
- osl::MutexGuard aGuard( GetLangGuessMutex() );
+ std::lock_guard aGuard( GetLangGuessMutex() );
EnsureInitialized();
@@ -233,7 +234,7 @@ uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getEnabledLanguages( )
uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getDisabledLanguages( )
{
- osl::MutexGuard aGuard( GetLangGuessMutex() );
+ std::lock_guard aGuard( GetLangGuessMutex() );
EnsureInitialized();
@@ -256,7 +257,7 @@ uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getDisabledLanguages( )
void SAL_CALL LangGuess_Impl::disableLanguages(
const uno::Sequence< Locale >& rLanguages )
{
- osl::MutexGuard aGuard( GetLangGuessMutex() );
+ std::lock_guard aGuard( GetLangGuessMutex() );
EnsureInitialized();
@@ -277,7 +278,7 @@ void SAL_CALL LangGuess_Impl::disableLanguages(
void SAL_CALL LangGuess_Impl::enableLanguages(
const uno::Sequence< Locale >& rLanguages )
{
- osl::MutexGuard aGuard( GetLangGuessMutex() );
+ std::lock_guard aGuard( GetLangGuessMutex() );
EnsureInitialized();