summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-18 20:45:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-20 17:52:48 +0100
commit1dc917b86cc1ae68dd9469e89c6f6aa2f9da5347 (patch)
tree4724df3d1ff4d076a654f11ed5285a0f01d1b2cd /i18npool
parenta08f3b10550761d637d27f5d88d554bd949417df (diff)
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.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/localedata/localedata.cxx7
1 files changed, 4 insertions, 3 deletions
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() );