summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-03 11:36:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-03 12:20:53 +0200
commit05ab38359ae72f2a54dc0b5f1b84ac5f649c507a (patch)
tree5830c7ee2442984e0bc804def7bd95ddd8a25410 /sot
parent5afdcad4c0e7850b18996c549892b9360cd8973f (diff)
Consolidate on C++17 std::scoped_lock instead of std::lock_guard
as in commit 9376f65a26240441bf9dd6ae1f69886dc9fa60fa Change-Id: I3ad9afd4d113582a214a4a4bc7eea55e38cd6ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119927 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/ucbstorage.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index cf75b1cf63cf..09b435550feb 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -146,7 +146,7 @@ sal_Int32 SAL_CALL FileStreamWrapper_Impl::readBytes(Sequence< sal_Int8 >& aData
if (nBytesToRead < 0)
throw BufferSizeExceededException(OUString(),static_cast<XWeak*>(this));
- std::lock_guard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
if (aData.getLength() < nBytesToRead)
aData.realloc(nBytesToRead);
@@ -190,7 +190,7 @@ void SAL_CALL FileStreamWrapper_Impl::skipBytes(sal_Int32 nBytesToSkip)
if ( m_aURL.isEmpty() )
return;
- std::lock_guard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
checkError();
m_pSvStream->SeekRel(nBytesToSkip);
@@ -203,7 +203,7 @@ sal_Int32 SAL_CALL FileStreamWrapper_Impl::available()
if ( m_aURL.isEmpty() )
return 0;
- std::lock_guard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
checkConnected();
sal_Int64 nAvailable = m_pSvStream->remainingSize();
@@ -218,7 +218,7 @@ void SAL_CALL FileStreamWrapper_Impl::closeInput()
if ( m_aURL.isEmpty() )
return;
- std::lock_guard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
checkConnected();
m_pSvStream.reset();
#if OSL_DEBUG_LEVEL > 0
@@ -234,7 +234,7 @@ void SAL_CALL FileStreamWrapper_Impl::seek( sal_Int64 _nLocation )
if ( m_aURL.isEmpty() )
return;
- std::lock_guard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
checkConnected();
m_pSvStream->Seek(static_cast<sal_uInt32>(_nLocation));
@@ -247,7 +247,7 @@ sal_Int64 SAL_CALL FileStreamWrapper_Impl::getPosition( )
if ( m_aURL.isEmpty() )
return 0;
- std::lock_guard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
checkConnected();
sal_uInt32 nPos = m_pSvStream->Tell();
@@ -261,7 +261,7 @@ sal_Int64 SAL_CALL FileStreamWrapper_Impl::getLength( )
if ( m_aURL.isEmpty() )
return 0;
- std::lock_guard aGuard( m_aMutex );
+ std::scoped_lock aGuard( m_aMutex );
checkConnected();
checkError();