diff options
| author | mowgli <[email protected]> | 2022-02-10 16:49:25 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:49:25 +0300 |
| commit | 89afbbe4ca0e02e386dd4df08f7945f190dc1b84 (patch) | |
| tree | c4772201af6215d48734691b8796e4cfc77c2ac8 /util/generic/buffer.cpp | |
| parent | 7510cec1516d17cbc8d7749974e36aa45f547a26 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 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 b92697e1d00..f8d5d840fb0 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; } |
