diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-08-04 21:07:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-05 20:39:57 +0200 |
commit | 466d464a7f31f10475c14260c6b0f11f1cb5a931 (patch) | |
tree | 2a257900f38020c91b8ac020d27251374ae3e66a /ucb | |
parent | 85d8b2f34bbb50288217fae395f72e1d1df7f4d6 (diff) |
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@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/cmis/std_inputstream.cxx | 10 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/std_inputstream.hxx | 4 |
2 files changed, 7 insertions, 7 deletions
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; }; |