aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/buffer.cpp
diff options
context:
space:
mode:
authorIlnur Khuziev <ilnur.khuziev@yandex.ru>2022-02-10 16:46:14 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:14 +0300
commit60040c91ffe701a84689b2c6310ff845e65cff42 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/generic/buffer.cpp
parent736dcd8ca259457a136f2f9f9168c44643914323 (diff)
downloadydb-60040c91ffe701a84689b2c6310ff845e65cff42.tar.gz
Restoring authorship annotation for Ilnur Khuziev <ilnur.khuziev@yandex.ru>. Commit 2 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 71931aa467e..b92697e1d00 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);