summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-29 16:04:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-29 20:31:44 +0200
commitf186149acd5018c66b9d11c8e3f30dda51b8e895 (patch)
treeac9a51f60fd22887cbc8a31c9e9bacb3fc6ae9bf /comphelper
parentadeaa3a2cf31478c15147afe1303b77f8949293a (diff)
osl::Mutex->std::mutex in OSLInputStreamWrapper
Change-Id: Id67cf7989a47f73b62e48b88c3e6f51efc2ccc46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119674 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/streaming/oslfile2streamwrap.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/comphelper/source/streaming/oslfile2streamwrap.cxx b/comphelper/source/streaming/oslfile2streamwrap.cxx
index eff916a833ff..472e085d642e 100644
--- a/comphelper/source/streaming/oslfile2streamwrap.cxx
+++ b/comphelper/source/streaming/oslfile2streamwrap.cxx
@@ -51,10 +51,10 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(css::uno::Sequence< sal_Int8
if (nBytesToRead < 0)
throw css::io::BufferSizeExceededException(OUString(),static_cast<css::uno::XWeak*>(this));
- ::osl::MutexGuard aGuard( m_aMutex );
-
aData.realloc(nBytesToRead);
+ std::lock_guard aGuard( m_aMutex );
+
sal_uInt64 nRead = 0;
FileBase::RC eError = m_pFile->read(static_cast<void*>(aData.getArray()), nBytesToRead, nRead);
if (eError != FileBase::E_None)
@@ -80,7 +80,7 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readSomeBytes(css::uno::Sequence< sal_
void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip)
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if (!m_pFile)
throw css::io::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this));
@@ -97,7 +97,7 @@ void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip)
sal_Int32 SAL_CALL OSLInputStreamWrapper::available()
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if (!m_pFile)
throw css::io::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this));