diff options
author | ienkovich <ienkovich@yandex-team.ru> | 2022-02-10 16:47:49 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:49 +0300 |
commit | 5bd76e73fa8dd777999be2668ff56928cc3dbecb (patch) | |
tree | cee73b6c84f7566d11209bd978e29a7fd9ccec54 /library/cpp/packedtypes/zigzag.h | |
parent | b031b9d140bcd39f4ef2764e24d37bee317aaf23 (diff) | |
download | ydb-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.h | 4 |
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> |