From 429e6e6efbfbc65d36452cbf8b3a25740a1dc8bc Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 30 Jul 2021 15:08:23 +0200 Subject: osl::Mutex->std::mutex in OInputStreamHelper Change-Id: Ia6aa6541474e0e4c190ab805a931d74c8a598baf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119723 Tested-by: Jenkins Reviewed-by: Noel Grandin --- unotools/source/streaming/streamhelper.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'unotools') diff --git a/unotools/source/streaming/streamhelper.cxx b/unotools/source/streaming/streamhelper.cxx index cf5930d43f19..bd8824d9456f 100644 --- a/unotools/source/streaming/streamhelper.cxx +++ b/unotools/source/streaming/streamhelper.cxx @@ -36,7 +36,7 @@ sal_Int32 SAL_CALL OInputStreamHelper::readBytes(css::uno::Sequence< sal_Int8 >& if (nBytesToRead < 0) throw css::io::BufferSizeExceededException(OUString(), static_cast(this)); - ::osl::MutexGuard aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); if (aData.getLength() < nBytesToRead) aData.realloc(nBytesToRead); @@ -56,7 +56,7 @@ sal_Int32 SAL_CALL OInputStreamHelper::readBytes(css::uno::Sequence< sal_Int8 >& void SAL_CALL OInputStreamHelper::seek( sal_Int64 location ) { - ::osl::MutexGuard aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); m_nActPos = location; } @@ -70,7 +70,7 @@ sal_Int64 SAL_CALL OInputStreamHelper::getLength( ) if (!m_xLockBytes.is()) return 0; - ::osl::MutexGuard aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); SvLockBytesStat aStat; m_xLockBytes->Stat( &aStat ); return aStat.nSize; @@ -85,7 +85,7 @@ sal_Int32 SAL_CALL OInputStreamHelper::readSomeBytes(css::uno::Sequence< sal_Int void SAL_CALL OInputStreamHelper::skipBytes(sal_Int32 nBytesToSkip) { - ::osl::MutexGuard aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); if (!m_xLockBytes.is()) throw css::io::NotConnectedException(OUString(), static_cast(this)); @@ -97,7 +97,7 @@ void SAL_CALL OInputStreamHelper::skipBytes(sal_Int32 nBytesToSkip) sal_Int32 SAL_CALL OInputStreamHelper::available() { - ::osl::MutexGuard aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); if (!m_xLockBytes.is()) throw css::io::NotConnectedException(OUString(), static_cast(this)); @@ -106,7 +106,7 @@ sal_Int32 SAL_CALL OInputStreamHelper::available() void SAL_CALL OInputStreamHelper::closeInput() { - ::osl::MutexGuard aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); if (!m_xLockBytes.is()) throw css::io::NotConnectedException(OUString(), static_cast(this)); -- cgit