diff options
Diffstat (limited to '7zip/Common/LockedStream.cpp')
-rwxr-xr-x | 7zip/Common/LockedStream.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/7zip/Common/LockedStream.cpp b/7zip/Common/LockedStream.cpp index 44af676d..36be1ceb 100755 --- a/7zip/Common/LockedStream.cpp +++ b/7zip/Common/LockedStream.cpp @@ -5,22 +5,13 @@ #include "LockedStream.h" HRESULT CLockedInStream::Read(UInt64 startPos, void *data, UInt32 size, - UInt32 *processedSize) -{ - NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection); - RINOK(_stream->Seek(startPos, STREAM_SEEK_SET, NULL)); - return _stream->Read(data, size, processedSize); -} - -HRESULT CLockedInStream::ReadPart(UInt64 startPos, void *data, UInt32 size, UInt32 *processedSize) { NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection); RINOK(_stream->Seek(startPos, STREAM_SEEK_SET, NULL)); - return _stream->ReadPart(data, size, processedSize); + return _stream->Read(data, size, processedSize); } - STDMETHODIMP CLockedSequentialInStreamImp::Read(void *data, UInt32 size, UInt32 *processedSize) { UInt32 realProcessedSize = 0; @@ -30,13 +21,3 @@ STDMETHODIMP CLockedSequentialInStreamImp::Read(void *data, UInt32 size, UInt32 *processedSize = realProcessedSize; return result; } - -STDMETHODIMP CLockedSequentialInStreamImp::ReadPart(void *data, UInt32 size, UInt32 *processedSize) -{ - UInt32 realProcessedSize = 0; - HRESULT result = _lockedInStream->ReadPart(_pos, data, size, &realProcessedSize); - _pos += realProcessedSize; - if (processedSize != NULL) - *processedSize = realProcessedSize; - return result; -} |