From 3487d85ea384f74c096499cfea8e565e778f8408 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 4 Aug 2021 21:36:25 +0200 Subject: osl::Mutex->std::mutex in fileaccess::XStream_impl Change-Id: I0cf23f83ae66669c4bbd17f68992126143756b27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120025 Tested-by: Jenkins Reviewed-by: Noel Grandin --- ucb/source/ucp/file/filstr.cxx | 8 ++++---- ucb/source/ucp/file/filstr.hxx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx index 3031510a6b7f..8b4274cb60e0 100644 --- a/ucb/source/ucp/file/filstr.cxx +++ b/ucb/source/ucp/file/filstr.cxx @@ -88,7 +88,7 @@ uno::Reference< io::XInputStream > SAL_CALL XStream_impl::getInputStream( ) { { - osl::MutexGuard aGuard( m_aMutex ); + std::scoped_lock aGuard( m_aMutex ); m_bInputStreamCalled = true; } return uno::Reference< io::XInputStream >( this ); @@ -99,7 +99,7 @@ uno::Reference< io::XOutputStream > SAL_CALL XStream_impl::getOutputStream( ) { { - osl::MutexGuard aGuard( m_aMutex ); + std::scoped_lock aGuard( m_aMutex ); m_bOutputStreamCalled = true; } return uno::Reference< io::XOutputStream >( this ); @@ -208,7 +208,7 @@ XStream_impl::closeStream() void SAL_CALL XStream_impl::closeInput() { - osl::MutexGuard aGuard( m_aMutex ); + std::scoped_lock aGuard( m_aMutex ); m_bInputStreamCalled = false; if( ! m_bOutputStreamCalled ) @@ -219,7 +219,7 @@ XStream_impl::closeInput() void SAL_CALL XStream_impl::closeOutput() { - osl::MutexGuard aGuard( m_aMutex ); + std::scoped_lock aGuard( m_aMutex ); m_bOutputStreamCalled = false; if( ! m_bInputStreamCalled ) diff --git a/ucb/source/ucp/file/filstr.hxx b/ucb/source/ucp/file/filstr.hxx index 13f963a9b751..e448f17052ab 100644 --- a/ucb/source/ucp/file/filstr.hxx +++ b/ucb/source/ucp/file/filstr.hxx @@ -18,7 +18,6 @@ */ #pragma once -#include #include #include #include @@ -27,6 +26,7 @@ #include #include #include +#include #include "filrec.hxx" @@ -122,7 +122,7 @@ class XStream_impl : public cppu::WeakImplHelper< private: - osl::Mutex m_aMutex; + std::mutex m_aMutex; bool m_bInputStreamCalled,m_bOutputStreamCalled; bool m_nIsOpen; -- cgit