diff options
author | Anton Samokhvalov <[email protected]> | 2022-02-10 16:45:17 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:45:17 +0300 |
commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /util/stream/zerocopy.cpp | |
parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) |
Restoring authorship annotation for Anton Samokhvalov <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/stream/zerocopy.cpp')
-rw-r--r-- | util/stream/zerocopy.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/stream/zerocopy.cpp b/util/stream/zerocopy.cpp index dffd211c1af..dc2982ad553 100644 --- a/util/stream/zerocopy.cpp +++ b/util/stream/zerocopy.cpp @@ -1,22 +1,22 @@ #include "zerocopy.h" -#include "output.h" - +#include "output.h" + IZeroCopyInput::~IZeroCopyInput() = default; - + size_t IZeroCopyInput::DoRead(void* buf, size_t len) { const void* ptr; size_t result = DoNext(&ptr, len); - - if (result) { - memcpy(buf, ptr, result); - } - + + if (result) { + memcpy(buf, ptr, result); + } + return result; } ui64 IZeroCopyInput::DoReadAll(IOutputStream& out) { ui64 result = 0; - const void* ptr; + const void* ptr; while (size_t len = Next(&ptr)) { out.Write(ptr, len); @@ -28,7 +28,7 @@ ui64 IZeroCopyInput::DoReadAll(IOutputStream& out) { size_t IZeroCopyInput::DoSkip(size_t len) { const void* ptr; - + return DoNext(&ptr, len); } |