diff options
author | ienkovich <ienkovich@yandex-team.ru> | 2022-02-10 16:47:50 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:50 +0300 |
commit | 0a579de32b745908473b2cea7c5cd5540bc801f0 (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/packedtypes/zigzag.h | |
parent | 5bd76e73fa8dd777999be2668ff56928cc3dbecb (diff) | |
download | ydb-0a579de32b745908473b2cea7c5cd5540bc801f0.tar.gz |
Restoring authorship annotation for <ienkovich@yandex-team.ru>. Commit 2 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 ea160864b8..548403f838 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> |