i18npool/source/localedata/localedata.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 1dc917b86cc1ae68dd9469e89c6f6aa2f9da5347
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sat Dec 18 20:45:05 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Dec 20 17:52:48 2021 +0100

    osl::Mutex->std::mutex in lcl_LookupTableHelper
    
    Change-Id: I76989e1f52be35fad63a090809da950ceed8fc69
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127113
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/i18npool/source/localedata/localedata.cxx 
b/i18npool/source/localedata/localedata.cxx
index c85476e01231..acb0f781f863 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <memory>
+#include <mutex>
 #include <string_view>
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/container/XIndexAccess.hpp>
@@ -475,7 +476,7 @@ public:
             std::optional<LocaleDataLookupTableItem>& rOutCachedItem );
 
 private:
-    ::osl::Mutex maMutex;
+    std::mutex maMutex;
     ::std::vector< LocaleDataLookupTableItem >  maLookupTable;
 };
 
@@ -525,7 +526,7 @@ oslGenericFunction 
lcl_LookupTableHelper::getFunctionSymbolByName(
         {
 #ifndef DISABLE_DYNLOADING
             {
-                ::osl::MutexGuard aGuard( maMutex );
+                std::unique_lock aGuard( maMutex );
                 for (LocaleDataLookupTableItem & rCurrent : maLookupTable)
                 {
                     if (rCurrent.dllName == i.pLib)
@@ -550,7 +551,7 @@ oslGenericFunction 
lcl_LookupTableHelper::getFunctionSymbolByName(
             std::unique_ptr<osl::Module> module(new osl::Module());
             if ( module->loadRelative(&thisModule, sModuleName.getStr()) )
             {
-                ::osl::MutexGuard aGuard( maMutex );
+                std::unique_lock aGuard( maMutex );
                 auto pTmpModule = module.get();
                 maLookupTable.emplace_back(i.pLib, module.release(), 
i.pLocale);
                 rOutCachedItem.emplace( maLookupTable.back() );

Reply via email to