aboutsummaryrefslogtreecommitdiffstats
path: root/util/stream/length.cpp
diff options
context:
space:
mode:
authorRuslan Kovalev <ruslan.a.kovalev@gmail.com>2022-02-10 16:46:44 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:44 +0300
commit59e19371de37995fcb36beb16cd6ec030af960bc (patch)
treefa68e36093ebff8b805462e9e6d331fe9d348214 /util/stream/length.cpp
parent89db6fe2fe2c32d2a832ddfeb04e8d078e301084 (diff)
downloadydb-59e19371de37995fcb36beb16cd6ec030af960bc.tar.gz
Restoring authorship annotation for Ruslan Kovalev <ruslan.a.kovalev@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'util/stream/length.cpp')
-rw-r--r--util/stream/length.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/util/stream/length.cpp b/util/stream/length.cpp
index 9907fe2ac9..09968fc2ab 100644
--- a/util/stream/length.cpp
+++ b/util/stream/length.cpp
@@ -1,32 +1,32 @@
-#include "length.h"
-
-size_t TLengthLimitedInput::DoRead(void* buf, size_t len) {
- const size_t toRead = (size_t)Min<ui64>(Length_, len);
- const size_t ret = Slave_->Read(buf, toRead);
-
- Length_ -= ret;
-
- return ret;
-}
-
-size_t TLengthLimitedInput::DoSkip(size_t len) {
- len = (size_t)Min<ui64>((ui64)len, Length_);
- len = Slave_->Skip(len);
- Length_ -= len;
- return len;
-}
-
-size_t TCountingInput::DoRead(void* buf, size_t len) {
- const size_t ret = Slave_->Read(buf, len);
- Count_ += ret;
- return ret;
-}
-
-size_t TCountingInput::DoSkip(size_t len) {
- const size_t ret = Slave_->Skip(len);
- Count_ += ret;
- return ret;
-}
+#include "length.h"
+
+size_t TLengthLimitedInput::DoRead(void* buf, size_t len) {
+ const size_t toRead = (size_t)Min<ui64>(Length_, len);
+ const size_t ret = Slave_->Read(buf, toRead);
+
+ Length_ -= ret;
+
+ return ret;
+}
+
+size_t TLengthLimitedInput::DoSkip(size_t len) {
+ len = (size_t)Min<ui64>((ui64)len, Length_);
+ len = Slave_->Skip(len);
+ Length_ -= len;
+ return len;
+}
+
+size_t TCountingInput::DoRead(void* buf, size_t len) {
+ const size_t ret = Slave_->Read(buf, len);
+ Count_ += ret;
+ return ret;
+}
+
+size_t TCountingInput::DoSkip(size_t len) {
+ const size_t ret = Slave_->Skip(len);
+ Count_ += ret;
+ return ret;
+}
size_t TCountingInput::DoReadTo(TString& st, char ch) {
const size_t ret = Slave_->ReadTo(st, ch);