[Libreoffice-commits] core.git: package/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 20 17:24:58 UTC 2021
package/source/xstor/switchpersistencestream.cxx | 28 +++++++++++------------
package/source/xstor/switchpersistencestream.hxx | 4 +--
2 files changed, 16 insertions(+), 16 deletions(-)
New commits:
commit d9f92805f15cf71f53a6a93f81805e088daca3d2
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sun Jul 18 18:54:51 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Jul 20 19:24:14 2021 +0200
osl::Mutex->std::mutex in SwitchablePersistenceStream
Change-Id: I4f34f9df3f760f112244845688b34663e5febb79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119278
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/package/source/xstor/switchpersistencestream.cxx b/package/source/xstor/switchpersistencestream.cxx
index 459f498fb98b..e646a3f06245 100644
--- a/package/source/xstor/switchpersistencestream.cxx
+++ b/package/source/xstor/switchpersistencestream.cxx
@@ -200,7 +200,7 @@ void SwitchablePersistenceStream::CloseAll_Impl()
// css::io::XStream
uno::Reference< io::XInputStream > SAL_CALL SwitchablePersistenceStream::getInputStream( )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( m_pStreamData )
m_pStreamData->m_bInOpen = true;
@@ -209,7 +209,7 @@ uno::Reference< io::XInputStream > SAL_CALL SwitchablePersistenceStream::getInpu
uno::Reference< io::XOutputStream > SAL_CALL SwitchablePersistenceStream::getOutputStream( )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( m_pStreamData )
m_pStreamData->m_bOutOpen = true;
@@ -219,7 +219,7 @@ uno::Reference< io::XOutputStream > SAL_CALL SwitchablePersistenceStream::getOut
// css::io::XInputStream
::sal_Int32 SAL_CALL SwitchablePersistenceStream::readBytes( uno::Sequence< ::sal_Int8 >& aData, ::sal_Int32 nBytesToRead )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_pStreamData )
throw io::NotConnectedException();
@@ -233,7 +233,7 @@ uno::Reference< io::XOutputStream > SAL_CALL SwitchablePersistenceStream::getOut
::sal_Int32 SAL_CALL SwitchablePersistenceStream::readSomeBytes( uno::Sequence< ::sal_Int8 >& aData, ::sal_Int32 nMaxBytesToRead )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_pStreamData )
throw io::NotConnectedException();
@@ -247,7 +247,7 @@ uno::Reference< io::XOutputStream > SAL_CALL SwitchablePersistenceStream::getOut
void SAL_CALL SwitchablePersistenceStream::skipBytes( ::sal_Int32 nBytesToSkip )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_pStreamData )
throw io::NotConnectedException();
@@ -261,7 +261,7 @@ void SAL_CALL SwitchablePersistenceStream::skipBytes( ::sal_Int32 nBytesToSkip )
::sal_Int32 SAL_CALL SwitchablePersistenceStream::available( )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_pStreamData )
throw io::NotConnectedException();
@@ -275,7 +275,7 @@ void SAL_CALL SwitchablePersistenceStream::skipBytes( ::sal_Int32 nBytesToSkip )
void SAL_CALL SwitchablePersistenceStream::closeInput()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_pStreamData )
throw io::NotConnectedException();
@@ -288,7 +288,7 @@ void SAL_CALL SwitchablePersistenceStream::closeInput()
// css::io::XOutputStream
void SAL_CALL SwitchablePersistenceStream::writeBytes( const uno::Sequence< ::sal_Int8 >& aData )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_pStreamData )
throw io::NotConnectedException();
@@ -305,7 +305,7 @@ void SAL_CALL SwitchablePersistenceStream::writeBytes( const uno::Sequence< ::sa
void SAL_CALL SwitchablePersistenceStream::flush( )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_pStreamData || m_pStreamData->m_bInStreamBased )
{
@@ -325,7 +325,7 @@ void SAL_CALL SwitchablePersistenceStream::flush( )
void SAL_CALL SwitchablePersistenceStream::closeOutput( )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_pStreamData )
throw io::NotConnectedException();
@@ -338,7 +338,7 @@ void SAL_CALL SwitchablePersistenceStream::closeOutput( )
// css::io::XTruncate
void SAL_CALL SwitchablePersistenceStream::truncate( )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_pStreamData )
throw io::NotConnectedException();
@@ -356,7 +356,7 @@ void SAL_CALL SwitchablePersistenceStream::truncate( )
// css::io::XSeekable
void SAL_CALL SwitchablePersistenceStream::seek( ::sal_Int64 location )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_pStreamData )
throw io::NotConnectedException();
@@ -370,7 +370,7 @@ void SAL_CALL SwitchablePersistenceStream::seek( ::sal_Int64 location )
::sal_Int64 SAL_CALL SwitchablePersistenceStream::getPosition( )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_pStreamData )
throw io::NotConnectedException();
@@ -384,7 +384,7 @@ void SAL_CALL SwitchablePersistenceStream::seek( ::sal_Int64 location )
::sal_Int64 SAL_CALL SwitchablePersistenceStream::getLength( )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if ( !m_pStreamData )
throw io::NotConnectedException();
diff --git a/package/source/xstor/switchpersistencestream.hxx b/package/source/xstor/switchpersistencestream.hxx
index f52d9bd4415e..76562d09d52e 100644
--- a/package/source/xstor/switchpersistencestream.hxx
+++ b/package/source/xstor/switchpersistencestream.hxx
@@ -31,7 +31,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
#include <com/sun/star/io/XAsyncOutputMonitor.hpp>
-#include <osl/mutex.hxx>
+#include <mutex>
#include <cppuhelper/implbase.hxx>
// SwitchablePersistenceStream
@@ -50,7 +50,7 @@ class SwitchablePersistenceStream
css::io::XSeekable,
css::io::XAsyncOutputMonitor >
{
- ::osl::Mutex m_aMutex;
+ std::mutex m_aMutex;
const css::uno::Reference< css::uno::XComponentContext > m_xContext;
More information about the Libreoffice-commits
mailing list