summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@collabora.co.uk>2023-02-01 15:54:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-02-01 17:09:12 +0000
commit7c035ff67993707cfd09c575a97028dab9683557 (patch)
tree95c22e91d8b333fdeea3de743bffd7dac209b4d6 /bridges
parent2798430c8a711861fdcdfbf9ac00a0527abd3bfc (diff)
osl::Mutex->std::mutex in ExceptionInfos
Change-Id: Ic947b58b9aba121c605b6795c7cd9aa0b16b180e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146455 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'bridges')
-rw-r--r--bridges/inc/msvc/except.hxx3
-rw-r--r--bridges/source/cpp_uno/msvc_shared/except.cxx4
2 files changed, 4 insertions, 3 deletions
diff --git a/bridges/inc/msvc/except.hxx b/bridges/inc/msvc/except.hxx
index 798fc44f147c..f1403a43af88 100644
--- a/bridges/inc/msvc/except.hxx
+++ b/bridges/inc/msvc/except.hxx
@@ -26,6 +26,7 @@
#include <rtl/ustrbuf.hxx>
#include <osl/mutex.hxx>
+#include <mutex>
#include <unordered_map>
typedef struct _uno_Any uno_Any;
@@ -101,7 +102,7 @@ public:
class ExceptionInfos final
{
- osl::Mutex m_aMutex;
+ std::mutex m_aMutex;
t_string2PtrMap m_allRaiseInfos;
public:
diff --git a/bridges/source/cpp_uno/msvc_shared/except.cxx b/bridges/source/cpp_uno/msvc_shared/except.cxx
index 283baa75173c..f76533fa160e 100644
--- a/bridges/source/cpp_uno/msvc_shared/except.cxx
+++ b/bridges/source/cpp_uno/msvc_shared/except.cxx
@@ -131,7 +131,7 @@ ExceptionInfos::~ExceptionInfos() noexcept
{
SAL_INFO("bridges", "> freeing exception infos... <");
- osl::MutexGuard aGuard(m_aMutex);
+ std::unique_lock aGuard(m_aMutex);
for (auto& rEntry : m_allRaiseInfos)
delete static_cast<RaiseInfo*>(rEntry.second);
}
@@ -154,7 +154,7 @@ RaiseInfo* ExceptionInfos::getRaiseInfo(typelib_TypeDescription* pTD) noexcept
RaiseInfo* pRaiseInfo;
OUString const& rTypeName = OUString::unacquired(&pTD->pTypeName);
- osl::MutexGuard aGuard(s_pInfos->m_aMutex);
+ std::unique_lock aGuard(s_pInfos->m_aMutex);
t_string2PtrMap::const_iterator const iFind(s_pInfos->m_allRaiseInfos.find(rTypeName));
if (iFind != s_pInfos->m_allRaiseInfos.end())
pRaiseInfo = static_cast<RaiseInfo*>(iFind->second);