From 5be9e0760ed74906c27b484e0d3235e70ea6f1c8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 17 Jul 2021 19:05:12 +0200 Subject: osl::Mutex->std::mutex in SequenceOutputStreamService Change-Id: I1aaa9ebd76e2376be82b25f2659d4b0f22dc14e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119113 Tested-by: Jenkins Reviewed-by: Noel Grandin --- comphelper/source/streaming/seqoutputstreamserv.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/streaming/seqoutputstreamserv.cxx b/comphelper/source/streaming/seqoutputstreamserv.cxx index 477961397413..e19ea1001ae8 100644 --- a/comphelper/source/streaming/seqoutputstreamserv.cxx +++ b/comphelper/source/streaming/seqoutputstreamserv.cxx @@ -26,6 +26,7 @@ #include #include #include +#include namespace com::sun::star::uno { class XComponentContext; } @@ -61,7 +62,7 @@ private: virtual ~SequenceOutputStreamService() override {}; - ::osl::Mutex m_aMutex; + std::mutex m_aMutex; uno::Reference< io::XOutputStream > m_xOutputStream; uno::Sequence< ::sal_Int8 > m_aSequence; }; @@ -89,7 +90,7 @@ uno::Sequence< OUString > SAL_CALL SequenceOutputStreamService::getSupportedServ // css::io::XOutputStream: void SAL_CALL SequenceOutputStreamService::writeBytes( const uno::Sequence< ::sal_Int8 > & aData ) { - ::osl::MutexGuard aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); if ( !m_xOutputStream.is() ) throw io::NotConnectedException(); @@ -98,7 +99,7 @@ void SAL_CALL SequenceOutputStreamService::writeBytes( const uno::Sequence< ::sa void SAL_CALL SequenceOutputStreamService::flush() { - ::osl::MutexGuard aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); if ( !m_xOutputStream.is() ) throw io::NotConnectedException(); @@ -107,7 +108,7 @@ void SAL_CALL SequenceOutputStreamService::flush() void SAL_CALL SequenceOutputStreamService::closeOutput() { - ::osl::MutexGuard aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); if ( !m_xOutputStream.is() ) throw io::NotConnectedException(); @@ -118,7 +119,7 @@ void SAL_CALL SequenceOutputStreamService::closeOutput() // css::io::XSequenceOutputStream: uno::Sequence< ::sal_Int8 > SAL_CALL SequenceOutputStreamService::getWrittenBytes() { - ::osl::MutexGuard aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); if ( !m_xOutputStream.is() ) throw io::NotConnectedException(); -- cgit