diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /util/stream/zerocopy.cpp | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 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 dc2982ad55..dffd211c1a 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); } |