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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sat Jul 31 08:03:04 UTC 2021


 unotools/source/config/itemholder1.cxx |    5 ++---
 unotools/source/config/itemholder1.hxx |    5 +++--
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit d088493a47654e7f6239e8743bd8b2382754212a
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Jul 30 15:04:50 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jul 31 10:02:31 2021 +0200

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

diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx
index f56e88cb0b2f..7870e63ae888 100644
--- a/unotools/source/config/itemholder1.cxx
+++ b/unotools/source/config/itemholder1.cxx
@@ -43,7 +43,6 @@
 #include <tools/diagnose_ex.h>
 
 ItemHolder1::ItemHolder1()
-    : ItemHolderMutexBase()
 {
     try
     {
@@ -87,7 +86,7 @@ void SAL_CALL ItemHolder1::disposing(const css::lang::EventObject&)
 
 void ItemHolder1::impl_addItem(EItem eItem)
 {
-    osl::MutexGuard aLock(m_aLock);
+    std::lock_guard aLock(m_aLock);
 
     for ( auto const & rInfo : m_lItems )
     {
@@ -106,7 +105,7 @@ void ItemHolder1::impl_releaseAllItems()
 {
     std::vector< TItemInfo > items;
     {
-        ::osl::MutexGuard aLock(m_aLock);
+        std::lock_guard aLock(m_aLock);
         items.swap(m_lItems);
     }
 
diff --git a/unotools/source/config/itemholder1.hxx b/unotools/source/config/itemholder1.hxx
index 8762938e968d..8e61bb55185b 100644
--- a/unotools/source/config/itemholder1.hxx
+++ b/unotools/source/config/itemholder1.hxx
@@ -22,14 +22,15 @@
 #include <unotools/itemholderbase.hxx>
 #include <cppuhelper/implbase.hxx>
 #include <com/sun/star/lang/XEventListener.hpp>
+#include <mutex>
 
-class ItemHolder1 : private ItemHolderMutexBase
-                  , public  ::cppu::WeakImplHelper< css::lang::XEventListener >
+class ItemHolder1 : public ::cppu::WeakImplHelper< css::lang::XEventListener >
 {
 
     // member
     private:
 
+        std::mutex m_aLock;
         std::vector<TItemInfo> m_lItems;
 
     // c++ interface


More information about the Libreoffice-commits mailing list