diff options
author | Stanislav Kirillov <staskirillov@gmail.com> | 2022-02-10 16:46:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:08 +0300 |
commit | cb68f224c46a8ee52ac3fdd2a32534b8bb8dc134 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/stream/multi.cpp | |
parent | 92fe2b1e7bc79f7b95adef61714fc003f6ea4a1c (diff) | |
download | ydb-cb68f224c46a8ee52ac3fdd2a32534b8bb8dc134.tar.gz |
Restoring authorship annotation for Stanislav Kirillov <staskirillov@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'util/stream/multi.cpp')
-rw-r--r-- | util/stream/multi.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/util/stream/multi.cpp b/util/stream/multi.cpp index 1886032560..b2354298a0 100644 --- a/util/stream/multi.cpp +++ b/util/stream/multi.cpp @@ -23,25 +23,25 @@ size_t TMultiInput::DoRead(void* buf, size_t len) { } size_t TMultiInput::DoReadTo(TString& st, char ch) { - size_t ret = C_->ReadTo(st, ch); - if (ret == st.size() + 1) { // found a symbol, not eof - return ret; - } - - C_ = N_; - N_ = &Cnull; - - if (ret == 0) { - ret += C_->ReadTo(st, ch); - } else { + size_t ret = C_->ReadTo(st, ch); + if (ret == st.size() + 1) { // found a symbol, not eof + return ret; + } + + C_ = N_; + N_ = &Cnull; + + if (ret == 0) { + ret += C_->ReadTo(st, ch); + } else { TString tmp; - ret += C_->ReadTo(tmp, ch); - st += tmp; - } - - return ret; -} - + ret += C_->ReadTo(tmp, ch); + st += tmp; + } + + return ret; +} + size_t TMultiInput::DoSkip(size_t len) { const size_t ret = C_->Skip(len); |