diff options
author | Stanislav Kirillov <[email protected]> | 2022-02-10 16:46:07 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:46:07 +0300 |
commit | 92fe2b1e7bc79f7b95adef61714fc003f6ea4a1c (patch) | |
tree | 817034f4ca57c9f841bb047ec94630c2e78a2b1d /util/stream/multi.cpp | |
parent | 53c76da6d9f6cc5a17f6029df396f0e3bc1ff47d (diff) |
Restoring authorship annotation for Stanislav Kirillov <[email protected]>. Commit 1 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 b2354298a0c..1886032560b 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); |