diff options
author | nikitamorozov <nikitamorozov@yandex-team.ru> | 2022-02-10 16:49:20 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:20 +0300 |
commit | 2342f2b56e674c21307fcb92a37853f950224d31 (patch) | |
tree | 7e3170fde6aea33759fe624ee5b7ec29de8af150 /util/stream/mem.cpp | |
parent | 2896882074ce784b7cabc4f2f7c502db74b34b80 (diff) | |
download | ydb-2342f2b56e674c21307fcb92a37853f950224d31.tar.gz |
Restoring authorship annotation for <nikitamorozov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/stream/mem.cpp')
-rw-r--r-- | util/stream/mem.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/util/stream/mem.cpp b/util/stream/mem.cpp index 22a3339e27..d57a3145fe 100644 --- a/util/stream/mem.cpp +++ b/util/stream/mem.cpp @@ -38,19 +38,19 @@ void TMemoryInput::DoUndo(size_t len) { TMemoryOutput::~TMemoryOutput() = default; -size_t TMemoryOutput::DoNext(void** ptr) { +size_t TMemoryOutput::DoNext(void** ptr) { Y_ENSURE(Buf_ < End_, TStringBuf("memory output stream exhausted")); - *ptr = Buf_; - size_t bufferSize = End_ - Buf_; - Buf_ = End_; - - return bufferSize; -} - -void TMemoryOutput::DoUndo(size_t len) { - Buf_ -= len; -} - + *ptr = Buf_; + size_t bufferSize = End_ - Buf_; + Buf_ = End_; + + return bufferSize; +} + +void TMemoryOutput::DoUndo(size_t len) { + Buf_ -= len; +} + void TMemoryOutput::DoWrite(const void* buf, size_t len) { char* end = Buf_ + len; Y_ENSURE(end <= End_, TStringBuf("memory output stream exhausted")); |