aboutsummaryrefslogtreecommitdiffstats
path: root/util/stream/aligned.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:17 +0300
commitd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch)
treedd4bd3ca0f36b817e96812825ffaf10d645803f2 /util/stream/aligned.h
parent72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff)
downloadydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'util/stream/aligned.h')
-rw-r--r--util/stream/aligned.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/util/stream/aligned.h b/util/stream/aligned.h
index 015c65dea0..70e7be05a9 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: