diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /util/stream/aligned.h | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/stream/aligned.h')
-rw-r--r-- | util/stream/aligned.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/util/stream/aligned.h b/util/stream/aligned.h index 70e7be05a9..015c65dea0 100644 --- a/util/stream/aligned.h +++ b/util/stream/aligned.h @@ -22,7 +22,7 @@ public: , Position_(0) { } - + /** * Ensures alignment of the position in the input stream by skipping * some input. @@ -34,7 +34,7 @@ public: if (Position_ & (alignment - 1)) { size_t len = alignment - (Position_ & (alignment - 1)); - + do { len -= DoSkip(len); } while (len); @@ -63,7 +63,7 @@ public: , Position_(0) { } - + TAlignedOutput(TAlignedOutput&&) noexcept = default; TAlignedOutput& operator=(TAlignedOutput&&) noexcept = default; @@ -80,12 +80,12 @@ public: void Align(size_t alignment = sizeof(void*)) { Y_ASSERT(IsPowerOf2(alignment)); - static char unused[sizeof(void*) * 2]; + static char unused[sizeof(void*) * 2]; Y_ASSERT(alignment <= sizeof(unused)); - if (Position_ & (alignment - 1)) { + if (Position_ & (alignment - 1)) { DoWrite(unused, alignment - (Position_ & (alignment - 1))); - } + } } private: |