summaryrefslogtreecommitdiff
path: root/package/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-08-15 19:33:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-08-16 14:01:07 +0200
commit4f5d694e5840b0b9bda15dc120e8b07d18d4cbd0 (patch)
treefdd291c8ea977e6ee51c111ec3da7a5b3582cfe9 /package/source
parentc767e78e629721771c1b9b16b647963ef652732d (diff)
tdf#158556 ByteGrabber does not need a mutex
it is only used from one place, and that place already locks a mutex around all usage Change-Id: I85a8d89220bee7806db5457d69cfcf2f11c1734d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171947 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'package/source')
-rw-r--r--package/source/zipapi/ByteGrabber.cxx11
1 files changed, 0 insertions, 11 deletions
diff --git a/package/source/zipapi/ByteGrabber.cxx b/package/source/zipapi/ByteGrabber.cxx
index 0e701a60007f..50083b4dafc2 100644
--- a/package/source/zipapi/ByteGrabber.cxx
+++ b/package/source/zipapi/ByteGrabber.cxx
@@ -50,7 +50,6 @@ ByteGrabber::~ByteGrabber()
void ByteGrabber::setInputStream (const uno::Reference < io::XInputStream >& xNewStream)
{
- std::scoped_lock aGuard( m_aMutex );
xStream = xNewStream;
xSeek.set(xNewStream, uno::UNO_QUERY);
}
@@ -59,14 +58,12 @@ void ByteGrabber::setInputStream (const uno::Reference < io::XInputStream >& xNe
sal_Int32 ByteGrabber::readBytes( uno::Sequence< sal_Int8 >& aData,
sal_Int32 nBytesToRead )
{
- std::scoped_lock aGuard( m_aMutex );
return xStream->readBytes(aData, nBytesToRead );
}
// XSeekable chained...
void ByteGrabber::seek( sal_Int64 location )
{
- std::scoped_lock aGuard( m_aMutex );
if (!xSeek.is() )
throw io::IOException(THROW_WHERE );
@@ -75,7 +72,6 @@ void ByteGrabber::seek( sal_Int64 location )
sal_Int64 ByteGrabber::getPosition( )
{
- std::scoped_lock aGuard( m_aMutex );
if (!xSeek.is() )
throw io::IOException(THROW_WHERE );
@@ -84,7 +80,6 @@ sal_Int64 ByteGrabber::getPosition( )
sal_Int64 ByteGrabber::getLength( )
{
- std::scoped_lock aGuard( m_aMutex );
if (!xSeek.is() )
throw io::IOException(THROW_WHERE );
@@ -93,8 +88,6 @@ sal_Int64 ByteGrabber::getLength( )
sal_uInt16 ByteGrabber::ReadUInt16()
{
- std::scoped_lock aGuard( m_aMutex );
-
if (xStream->readBytes(aSequence, 2) != 2)
return 0;
@@ -106,8 +99,6 @@ sal_uInt16 ByteGrabber::ReadUInt16()
sal_uInt32 ByteGrabber::ReadUInt32()
{
- std::scoped_lock aGuard( m_aMutex );
-
if (xStream->readBytes(aSequence, 4) != 4)
return 0;
@@ -121,8 +112,6 @@ sal_uInt32 ByteGrabber::ReadUInt32()
sal_uInt64 ByteGrabber::ReadUInt64()
{
- std::scoped_lock aGuard(m_aMutex);
-
if (xStream->readBytes(aSequence, 8) != 8)
return 0;