aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/buffer.cpp
diff options
context:
space:
mode:
authorIlnur Khuziev <ilnur.khuziev@yandex.ru>2022-02-10 16:46:13 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:13 +0300
commit736dcd8ca259457a136f2f9f9168c44643914323 (patch)
treeddd46a036d68bfa83aa11b892f31243ea6b068a1 /util/generic/buffer.cpp
parent9bf2fa2b060c9881d3135c2208c624a1dd546ecc (diff)
downloadydb-736dcd8ca259457a136f2f9f9168c44643914323.tar.gz
Restoring authorship annotation for Ilnur Khuziev <ilnur.khuziev@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/buffer.cpp')
-rw-r--r--util/generic/buffer.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/util/generic/buffer.cpp b/util/generic/buffer.cpp
index b92697e1d00..71931aa467e 100644
--- a/util/generic/buffer.cpp
+++ b/util/generic/buffer.cpp
@@ -4,7 +4,7 @@
#include "ymath.h"
#include <util/system/sys_alloc.h>
-#include <util/system/sanitizers.h>
+#include <util/system/sanitizers.h>
TBuffer::TBuffer(size_t len)
: Data_(nullptr)
@@ -44,20 +44,20 @@ TBuffer& TBuffer::operator=(TBuffer&& b) noexcept {
return *this;
}
-void TBuffer::Append(const char* buf, size_t len) {
- if (len > Avail()) {
- Reserve(Pos_ + len);
- }
-
- Y_ASSERT(len <= Avail());
-
+void TBuffer::Append(const char* buf, size_t len) {
+ if (len > Avail()) {
+ Reserve(Pos_ + len);
+ }
+
+ Y_ASSERT(len <= Avail());
+
MemCopy(Data() + Pos_, buf, len);
- NSan::Unpoison(Data() + Pos_, len);
- Pos_ += len;
-
- Y_ASSERT(Pos_ <= Len_);
-}
-
+ NSan::Unpoison(Data() + Pos_, len);
+ Pos_ += len;
+
+ Y_ASSERT(Pos_ <= Len_);
+}
+
void TBuffer::Fill(char ch, size_t len) {
if (len > Avail()) {
Reserve(Pos_ + len);