[Libreoffice-commits] core.git: bridges/inc bridges/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sun Jul 18 18:47:20 UTC 2021


 bridges/inc/vtablefactory.hxx                   |    4 ++--
 bridges/source/cpp_uno/shared/vtablefactory.cxx |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 4ab57949a2cbaacba33375ea33dc896205eac6c9
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sun Jul 18 14:25:02 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Jul 18 20:46:47 2021 +0200

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

diff --git a/bridges/inc/vtablefactory.hxx b/bridges/inc/vtablefactory.hxx
index c169f7c0bfd0..9afcb837099d 100644
--- a/bridges/inc/vtablefactory.hxx
+++ b/bridges/inc/vtablefactory.hxx
@@ -19,13 +19,13 @@
 
 #pragma once
 
-#include <osl/mutex.hxx>
 #include <rtl/alloc.h>
 #include <rtl/ustring.hxx>
 #include <sal/types.h>
 #include <typelib/typedescription.hxx>
 
 #include <memory>
+#include <mutex>
 #include <unordered_map>
 
 /*See: http://people.redhat.com/drepper/selinux-mem.html*/
@@ -210,7 +210,7 @@ private:
 
     typedef std::unordered_map< OUString, Vtables > Map;
 
-    osl::Mutex m_mutex;
+    std::mutex m_mutex;
     Map m_map;
 
     rtl_arena_type * m_arena;
diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx b/bridges/source/cpp_uno/shared/vtablefactory.cxx
index 9d4c5d31dd3f..a74d75ed1f28 100644
--- a/bridges/source/cpp_uno/shared/vtablefactory.cxx
+++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx
@@ -214,7 +214,7 @@ VtableFactory::VtableFactory(): m_arena(
 
 VtableFactory::~VtableFactory() {
     {
-        osl::MutexGuard guard(m_mutex);
+        std::lock_guard guard(m_mutex);
         for (const auto& rEntry : m_map) {
             for (sal_Int32 j = 0; j < rEntry.second.count; ++j) {
                 freeBlock(rEntry.second.blocks[j]);
@@ -228,7 +228,7 @@ const VtableFactory::Vtables& VtableFactory::getVtables(
     typelib_InterfaceTypeDescription * type)
 {
     OUString name(type->aBase.pTypeName);
-    osl::MutexGuard guard(m_mutex);
+    std::lock_guard guard(m_mutex);
     Map::iterator i(m_map.find(name));
     if (i == m_map.end()) {
         GuardedBlocks blocks(*this);


More information about the Libreoffice-commits mailing list