ucb/source/ucp/tdoc/tdoc_stgelems.hxx            |   20 +++++++++-----------
 ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx |    4 ++--
 ucb/source/ucp/webdav-neon/DAVSessionFactory.hxx |    4 ++--
 3 files changed, 13 insertions(+), 15 deletions(-)

New commits:
commit 43d6a33dddd339b0bc8d42fece9e22dc44c9da57
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Thu Aug 5 20:36:28 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Aug 6 08:58:44 2021 +0200

    osl::Mutex->std::mutex in DAVSessionFactory
    
    Change-Id: I1fa55f09e3a9d398a61856986cb0a91e225c7b79
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120087
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx 
b/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx
index fd6fca081e80..d58171bdef6e 100644
--- a/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx
+++ b/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx
@@ -44,7 +44,7 @@ rtl::Reference< DAVSession > 
DAVSessionFactory::createDAVSession(
                 const uno::Sequence< beans::NamedValue >& rFlags,
                 const uno::Reference< uno::XComponentContext > & rxContext )
 {
-    osl::MutexGuard aGuard( m_aMutex );
+    std::scoped_lock aGuard( m_aMutex );
 
     m_xContext = rxContext;
 
@@ -91,7 +91,7 @@ rtl::Reference< DAVSession > 
DAVSessionFactory::createDAVSession(
 void DAVSessionFactory::releaseElement( DAVSession const * pElement )
 {
     OSL_ASSERT( pElement );
-    osl::MutexGuard aGuard( m_aMutex );
+    std::scoped_lock aGuard( m_aMutex );
     if ( pElement->m_aContainerIt != m_aMap.end() )
         m_aMap.erase( pElement->m_aContainerIt );
 }
diff --git a/ucb/source/ucp/webdav-neon/DAVSessionFactory.hxx 
b/ucb/source/ucp/webdav-neon/DAVSessionFactory.hxx
index eac25471e826..fd185d11ae8a 100644
--- a/ucb/source/ucp/webdav-neon/DAVSessionFactory.hxx
+++ b/ucb/source/ucp/webdav-neon/DAVSessionFactory.hxx
@@ -33,7 +33,7 @@
 #include <config_lgpl.h>
 #include <map>
 #include <memory>
-#include <osl/mutex.hxx>
+#include <mutex>
 #include <salhelper/simplereferenceobject.hxx>
 #include <rtl/ref.hxx>
 #include <com/sun/star/uno/Reference.hxx>
@@ -70,7 +70,7 @@ private:
     typedef std::map< OUString, DAVSession * > Map;
 
     Map m_aMap;
-    osl::Mutex m_aMutex;
+    std::mutex m_aMutex;
     std::unique_ptr< ucbhelper::InternetProxyDecider > m_xProxyDecider;
 
     ::uno::Reference< ::uno::XComponentContext > m_xContext;
commit cc6701f9e58f4b655313fa75da8980bb93ae545e
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Thu Aug 5 20:31:31 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Aug 6 08:58:34 2021 +0200

    osl::Mutex->std::mutex in ParentStorageHolder
    
    Change-Id: I01cd21cddc10b09ea8026e84fa64331067b38db0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120086
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.hxx 
b/ucb/source/ucp/tdoc/tdoc_stgelems.hxx
index eda5390f07b6..f6e8f609e025 100644
--- a/ucb/source/ucp/tdoc/tdoc_stgelems.hxx
+++ b/ucb/source/ucp/tdoc/tdoc_stgelems.hxx
@@ -19,9 +19,6 @@
 
 #pragma once
 
-#include <memory>
-
-#include <osl/mutex.hxx>
 #include <rtl/ref.hxx>
 
 #include <cppuhelper/implbase.hxx>
@@ -36,15 +33,12 @@
 
 #include "tdoc_storage.hxx"
 
-namespace tdoc_ucp {
-
-struct MutexHolder
-{
-    osl::Mutex m_aMutex;
-};
+#include <memory>
+#include <mutex>
 
+namespace tdoc_ucp {
 
-class ParentStorageHolder : public MutexHolder
+class ParentStorageHolder
 {
 public:
     ParentStorageHolder(
@@ -57,9 +51,13 @@ public:
     getParentStorage() const
     { return m_xParentStorage; }
     void setParentStorage( const css::uno::Reference< css::embed::XStorage > & 
xStg )
-    { osl::MutexGuard aGuard( m_aMutex ); m_xParentStorage = xStg; }
+    {
+        std::scoped_lock aGuard( m_aMutex );
+        m_xParentStorage = xStg;
+    }
 
 private:
+    std::mutex m_aMutex;
     css::uno::Reference< css::embed::XStorage > m_xParentStorage;
     bool                                  m_bParentIsRootStorage;
 };

Reply via email to