xref: /aosp_15_r20/external/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp (revision f6dc9357d832569d4d1f5d24eacdb3935a1ae8e6)
1 // DummyOutStream.cpp
2 
3 #include "StdAfx.h"
4 
5 #include "DummyOutStream.h"
6 
Z7_COM7F_IMF(CDummyOutStream::Write (const void * data,UInt32 size,UInt32 * processedSize))7 Z7_COM7F_IMF(CDummyOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize))
8 {
9   UInt32 realProcessedSize = size;
10   HRESULT res = S_OK;
11   if (_stream)
12     res = _stream->Write(data, size, &realProcessedSize);
13   _size += realProcessedSize;
14   if (processedSize)
15     *processedSize = realProcessedSize;
16   return res;
17 }
18