summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-07-31 19:07:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-31 22:32:34 +0200
commit26f7e6320942890ff0b916d37cde02270475ae16 (patch)
tree0e9e33066315376b8b356cb19ba0db1c1143bd11 /xmlhelp
parent7a4a107283dd43a35434f73cd7fbf291c8837b6d (diff)
osl::Mutex->std::mutex in InputStreamTransformer
Change-Id: I64344b890c35d35b3d1b481436eb624183febec6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index e06a8df419ce..75633b3d03ae 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -42,6 +42,7 @@
#include "databases.hxx"
#include <memory>
+#include <mutex>
using namespace cppu;
using namespace com::sun::star::io;
@@ -319,7 +320,7 @@ public:
private:
- osl::Mutex m_aMutex;
+ std::mutex m_aMutex;
int pos;
OStringBuffer buffer;
@@ -902,7 +903,7 @@ void SAL_CALL InputStreamTransformer::release() noexcept
sal_Int32 SAL_CALL InputStreamTransformer::readBytes( Sequence< sal_Int8 >& aData,sal_Int32 nBytesToRead )
{
- osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
int curr,available_ = buffer.getLength() - pos;
if( nBytesToRead <= available_ )
@@ -928,14 +929,14 @@ sal_Int32 SAL_CALL InputStreamTransformer::readSomeBytes( Sequence< sal_Int8 >&
void SAL_CALL InputStreamTransformer::skipBytes( sal_Int32 nBytesToSkip )
{
- osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
while( nBytesToSkip-- ) ++pos;
}
sal_Int32 SAL_CALL InputStreamTransformer::available()
{
- osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
return std::min<sal_Int64>(SAL_MAX_INT32, buffer.getLength() - pos);
}
@@ -947,7 +948,7 @@ void SAL_CALL InputStreamTransformer::closeInput()
void SAL_CALL InputStreamTransformer::seek( sal_Int64 location )
{
- osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
if( location < 0 )
throw IllegalArgumentException();
@@ -960,14 +961,14 @@ void SAL_CALL InputStreamTransformer::seek( sal_Int64 location )
sal_Int64 SAL_CALL InputStreamTransformer::getPosition()
{
- osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
return sal_Int64( pos );
}
sal_Int64 SAL_CALL InputStreamTransformer::getLength()
{
- osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
return buffer.getLength();
}
@@ -975,7 +976,7 @@ sal_Int64 SAL_CALL InputStreamTransformer::getLength()
void InputStreamTransformer::addToBuffer( const char* buffer_,int len_ )
{
- osl::MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
buffer.append( buffer_, len_ );
}