diff options
Diffstat (limited to '3rdparty/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp')
-rw-r--r-- | 3rdparty/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/3rdparty/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp b/3rdparty/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp index 54bcfec1108..7c4f54879de 100644 --- a/3rdparty/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp +++ b/3rdparty/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp @@ -4,19 +4,14 @@ #include "DummyOutStream.h" -STDMETHODIMP CDummyOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +STDMETHODIMP CDummyOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) { - UInt32 realProcessedSize; - HRESULT result; - if(!_stream) - { - realProcessedSize = size; - result = S_OK; - } - else - result = _stream->Write(data, size, &realProcessedSize); + UInt32 realProcessedSize = size; + HRESULT res = S_OK; + if (_stream) + res = _stream->Write(data, size, &realProcessedSize); _size += realProcessedSize; - if(processedSize != NULL) + if (processedSize) *processedSize = realProcessedSize; - return result; + return res; } |