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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 5 18:40:34 UTC 2021


 ucb/source/ucp/cmis/std_inputstream.cxx |   10 +++++-----
 ucb/source/ucp/cmis/std_inputstream.hxx |    4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 466d464a7f31f10475c14260c6b0f11f1cb5a931
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Wed Aug 4 21:07:40 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Aug 5 20:39:57 2021 +0200

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

diff --git a/ucb/source/ucp/cmis/std_inputstream.cxx b/ucb/source/ucp/cmis/std_inputstream.cxx
index 9ec4f6034f95..6ab970d327f3 100644
--- a/ucb/source/ucp/cmis/std_inputstream.cxx
+++ b/ucb/source/ucp/cmis/std_inputstream.cxx
@@ -61,7 +61,7 @@ namespace cmis
 
     sal_Int32 SAL_CALL StdInputStream::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead )
     {
-        osl::MutexGuard aGuard( m_aMutex );
+        std::scoped_lock aGuard( m_aMutex );
 
         if ( 0 <= nBytesToRead && aData.getLength() < nBytesToRead )
             aData.realloc( nBytesToRead );
@@ -87,7 +87,7 @@ namespace cmis
     sal_Int32 SAL_CALL StdInputStream::readSomeBytes( uno::Sequence< sal_Int8 >& aData,
             sal_Int32 nMaxBytesToRead )
     {
-        osl::MutexGuard aGuard( m_aMutex );
+        std::scoped_lock aGuard( m_aMutex );
 
         if ( 0 <= nMaxBytesToRead && aData.getLength() < nMaxBytesToRead )
             aData.realloc( nMaxBytesToRead );
@@ -110,7 +110,7 @@ namespace cmis
 
     void SAL_CALL StdInputStream::skipBytes( sal_Int32 nBytesToSkip )
     {
-        osl::MutexGuard aGuard( m_aMutex );
+        std::scoped_lock aGuard( m_aMutex );
 
         if (!m_pStream)
             throw io::IOException( );
@@ -138,7 +138,7 @@ namespace cmis
 
     void SAL_CALL StdInputStream::seek( sal_Int64 location )
     {
-        osl::MutexGuard aGuard( m_aMutex );
+        std::scoped_lock aGuard( m_aMutex );
 
         if ( location < 0 || location > m_nLength )
             throw lang::IllegalArgumentException(
@@ -162,7 +162,7 @@ namespace cmis
 
     sal_Int64 SAL_CALL StdInputStream::getPosition( )
     {
-        osl::MutexGuard aGuard( m_aMutex );
+        std::scoped_lock aGuard( m_aMutex );
 
         if (!m_pStream)
             throw io::IOException( );
diff --git a/ucb/source/ucp/cmis/std_inputstream.hxx b/ucb/source/ucp/cmis/std_inputstream.hxx
index 82bf5e39b568..7cfcf7a88901 100644
--- a/ucb/source/ucp/cmis/std_inputstream.hxx
+++ b/ucb/source/ucp/cmis/std_inputstream.hxx
@@ -12,7 +12,7 @@
 #include <boost/shared_ptr.hpp>
 #include <istream>
 
-#include <osl/mutex.hxx>
+#include <mutex>
 #include <cppuhelper/weak.hxx>
 #include <com/sun/star/io/XInputStream.hpp>
 #include <com/sun/star/io/XSeekable.hpp>
@@ -73,7 +73,7 @@ namespace cmis
 
         private:
 
-            osl::Mutex m_aMutex;
+            std::mutex m_aMutex;
             boost::shared_ptr< std::istream > m_pStream;
             sal_Int64 m_nLength;
     };


More information about the Libreoffice-commits mailing list