aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/packedtypes/zigzag.h
diff options
context:
space:
mode:
authorienkovich <ienkovich@yandex-team.ru>2022-02-10 16:47:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:49 +0300
commit5bd76e73fa8dd777999be2668ff56928cc3dbecb (patch)
treecee73b6c84f7566d11209bd978e29a7fd9ccec54 /library/cpp/packedtypes/zigzag.h
parentb031b9d140bcd39f4ef2764e24d37bee317aaf23 (diff)
downloadydb-5bd76e73fa8dd777999be2668ff56928cc3dbecb.tar.gz
Restoring authorship annotation for <ienkovich@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/packedtypes/zigzag.h')
-rw-r--r--library/cpp/packedtypes/zigzag.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/cpp/packedtypes/zigzag.h b/library/cpp/packedtypes/zigzag.h
index 548403f838..ea160864b8 100644
--- a/library/cpp/packedtypes/zigzag.h
+++ b/library/cpp/packedtypes/zigzag.h
@@ -10,8 +10,8 @@
template <typename TSignedInt>
inline auto ZigZagEncode(TSignedInt n) -> std::make_unsigned_t<TSignedInt> {
static_assert(std::is_signed<TSignedInt>::value && std::is_integral<TSignedInt>::value, "Expected signed integral type.");
- auto un = static_cast<std::make_unsigned_t<TSignedInt>>(n);
- return (un << 1) ^ (n >> (CHAR_BIT * sizeof(TSignedInt) - 1));
+ auto un = static_cast<std::make_unsigned_t<TSignedInt>>(n);
+ return (un << 1) ^ (n >> (CHAR_BIT * sizeof(TSignedInt) - 1));
}
template <typename TUnsignedInt>