[Libreoffice-commits] core.git: comphelper/source include/comphelper
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 29 17:26:16 UTC 2021
comphelper/source/streaming/seekableinput.cxx | 16 ++++++++--------
include/comphelper/seekableinput.hxx | 4 ++--
2 files changed, 10 insertions(+), 10 deletions(-)
New commits:
commit e15586246b94815de2004a6f73fdbd3473e62525
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jul 29 16:02:06 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Jul 29 19:25:43 2021 +0200
osl::Mutex->std::mutex in OSeekableInputWrapper
Change-Id: Ib6cc0a6b1fcc4685f2ac8c120c86ce79f3036535
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119673
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/comphelper/source/streaming/seekableinput.cxx b/comphelper/source/streaming/seekableinput.cxx
index 905e739e85a1..e9291c6c9234 100644
--- a/comphelper/source/streaming/seekableinput.cxx
+++ b/comphelper/source/streaming/seekableinput.cxx
@@ -117,7 +117,7 @@ void OSeekableInputWrapper::PrepareCopy_Impl()
sal_Int32 SAL_CALL OSeekableInputWrapper::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOriginalStream.is() )
throw io::NotConnectedException();
@@ -130,7 +130,7 @@ sal_Int32 SAL_CALL OSeekableInputWrapper::readBytes( uno::Sequence< sal_Int8 >&
sal_Int32 SAL_CALL OSeekableInputWrapper::readSomeBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOriginalStream.is() )
throw io::NotConnectedException();
@@ -143,7 +143,7 @@ sal_Int32 SAL_CALL OSeekableInputWrapper::readSomeBytes( uno::Sequence< sal_Int8
void SAL_CALL OSeekableInputWrapper::skipBytes( sal_Int32 nBytesToSkip )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOriginalStream.is() )
throw io::NotConnectedException();
@@ -156,7 +156,7 @@ void SAL_CALL OSeekableInputWrapper::skipBytes( sal_Int32 nBytesToSkip )
sal_Int32 SAL_CALL OSeekableInputWrapper::available()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOriginalStream.is() )
throw io::NotConnectedException();
@@ -169,7 +169,7 @@ sal_Int32 SAL_CALL OSeekableInputWrapper::available()
void SAL_CALL OSeekableInputWrapper::closeInput()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOriginalStream.is() )
throw io::NotConnectedException();
@@ -191,7 +191,7 @@ void SAL_CALL OSeekableInputWrapper::closeInput()
void SAL_CALL OSeekableInputWrapper::seek( sal_Int64 location )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOriginalStream.is() )
throw io::NotConnectedException();
@@ -204,7 +204,7 @@ void SAL_CALL OSeekableInputWrapper::seek( sal_Int64 location )
sal_Int64 SAL_CALL OSeekableInputWrapper::getPosition()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOriginalStream.is() )
throw io::NotConnectedException();
@@ -217,7 +217,7 @@ sal_Int64 SAL_CALL OSeekableInputWrapper::getPosition()
sal_Int64 SAL_CALL OSeekableInputWrapper::getLength()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_xOriginalStream.is() )
throw io::NotConnectedException();
diff --git a/include/comphelper/seekableinput.hxx b/include/comphelper/seekableinput.hxx
index 5ab241071a70..5c2e6be07c6e 100644
--- a/include/comphelper/seekableinput.hxx
+++ b/include/comphelper/seekableinput.hxx
@@ -19,12 +19,12 @@
#ifndef INCLUDED_COMPHELPER_SEEKABLEINPUT_HXX
#define INCLUDED_COMPHELPER_SEEKABLEINPUT_HXX
-#include <osl/mutex.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XSeekable.hpp>
#include <cppuhelper/implbase.hxx>
#include <comphelper/comphelperdllapi.h>
+#include <mutex>
namespace com::sun::star::uno { class XComponentContext; }
@@ -39,7 +39,7 @@ class SAL_DLLPUBLIC_TEMPLATE OSeekableInputWrapper_BASE
class COMPHELPER_DLLPUBLIC OSeekableInputWrapper final
: public OSeekableInputWrapper_BASE
{
- ::osl::Mutex m_aMutex;
+ std::mutex m_aMutex;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
More information about the Libreoffice-commits
mailing list