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

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


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

New commits:
commit 3d18cae102e16b85fb8787f5ec3b086bfa2bd7b8
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sun Jul 18 11:59:28 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Jul 18 21:59:50 2021 +0200

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

diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index 09814d5d08eb..f1543d293de7 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -51,6 +51,7 @@
 #include <com/sun/star/uno/XComponentContext.hpp>
 
 #include <iterator>
+#include <mutex>
 #include <string_view>
 #include <unordered_map>
 #include <unordered_set>
@@ -137,7 +138,7 @@ public:
     sal_Bool SAL_CALL hasMoreElements() override;
     Any SAL_CALL nextElement() override;
 private:
-    Mutex                               aMutex;
+    std::mutex                          aMutex;
     Sequence< Reference<XInterface > >  aFactories;
     sal_Int32                           nIt;
 };
@@ -145,14 +146,14 @@ private:
 // XEnumeration
 sal_Bool ServiceEnumeration_Impl::hasMoreElements()
 {
-    MutexGuard aGuard( aMutex );
+    std::lock_guard aGuard( aMutex );
     return nIt != aFactories.getLength();
 }
 
 // XEnumeration
 Any ServiceEnumeration_Impl::nextElement()
 {
-    MutexGuard aGuard( aMutex );
+    std::lock_guard aGuard( aMutex );
     if( nIt == aFactories.getLength() )
         throw NoSuchElementException("no more elements");
 


More information about the Libreoffice-commits mailing list