diff options
author | mowgli <mowgli@yandex-team.ru> | 2022-02-10 16:49:25 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:25 +0300 |
commit | 56c39b3cf908e7202b1f7551a1653681e8015607 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic/buffer.cpp | |
parent | 89afbbe4ca0e02e386dd4df08f7945f190dc1b84 (diff) | |
download | ydb-56c39b3cf908e7202b1f7551a1653681e8015607.tar.gz |
Restoring authorship annotation for <mowgli@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/buffer.cpp')
-rw-r--r-- | util/generic/buffer.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/util/generic/buffer.cpp b/util/generic/buffer.cpp index f8d5d840fb0..b92697e1d00 100644 --- a/util/generic/buffer.cpp +++ b/util/generic/buffer.cpp @@ -73,18 +73,18 @@ void TBuffer::Fill(char ch, size_t len) { } void TBuffer::DoReserve(size_t realLen) { - // FastClp2<T>(x) returns 0 on x from [Max<T>/2 + 2, Max<T>] - const size_t len = Max<size_t>(FastClp2(realLen), realLen); + // FastClp2<T>(x) returns 0 on x from [Max<T>/2 + 2, Max<T>] + const size_t len = Max<size_t>(FastClp2(realLen), realLen); Y_ASSERT(realLen > Len_); Y_ASSERT(len >= realLen); - Realloc(len); -} - -void TBuffer::Realloc(size_t len) { + Realloc(len); +} + +void TBuffer::Realloc(size_t len) { Y_ASSERT(Pos_ <= len); - + Data_ = (char*)y_reallocate(Data_, len); Len_ = len; } |