[Libreoffice-commits] core.git: svl/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 23 06:55:27 UTC 2021


 svl/source/config/languageoptions.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit da340c48ecd67e1b97546842dae013306caa6ace
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Thu Jul 22 21:51:11 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jul 23 08:54:54 2021 +0200

    osl::Mutex->std::mutex in SvtLanguageOptions
    
    Change-Id: I5b24c729f63f2f51b2a2bebc8539e8c61cf77bee
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119388
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx
index f00812b30b8d..4f3f7671eda7 100644
--- a/svl/source/config/languageoptions.cxx
+++ b/svl/source/config/languageoptions.cxx
@@ -23,12 +23,12 @@
 #include <svl/ctloptions.hxx>
 #include <i18nlangtag/mslangid.hxx>
 #include <i18nlangtag/languagetag.hxx>
-#include <osl/mutex.hxx>
 #include <rtl/instance.hxx>
 #include <com/sun/star/i18n/ScriptType.hpp>
 #include <unotools/syslocale.hxx>
 #include <com/sun/star/uno/Any.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
+#include <mutex>
 
 #ifdef _WIN32
 #if !defined WIN32_LEAN_AND_MEAN
@@ -40,12 +40,12 @@
 using namespace ::com::sun::star;
 // global
 
-namespace { struct ALMutex : public rtl::Static< ::osl::Mutex, ALMutex > {}; }
+namespace { struct ALMutex : public rtl::Static< std::mutex, ALMutex > {}; }
 
 SvtLanguageOptions::SvtLanguageOptions( bool _bDontLoad )
 {
     // Global access, must be guarded (multithreading)
-    ::osl::MutexGuard aGuard( ALMutex::get() );
+    std::lock_guard aGuard( ALMutex::get() );
 
     m_pCJKOptions.reset(new SvtCJKOptions( _bDontLoad ));
     m_pCTLOptions.reset(new SvtCTLOptions( _bDontLoad ));
@@ -55,7 +55,7 @@ SvtLanguageOptions::SvtLanguageOptions( bool _bDontLoad )
 SvtLanguageOptions::~SvtLanguageOptions()
 {
     // Global access, must be guarded (multithreading)
-    ::osl::MutexGuard aGuard( ALMutex::get() );
+    std::lock_guard aGuard( ALMutex::get() );
 
     m_pCTLOptions->RemoveListener(this);
     m_pCJKOptions->RemoveListener(this);


More information about the Libreoffice-commits mailing list