diff options
author | thegeorg <thegeorg@yandex-team.ru> | 2022-02-10 16:45:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:08 +0300 |
commit | 4e839db24a3bbc9f1c610c43d6faaaa99824dcca (patch) | |
tree | 506dac10f5df94fab310584ee51b24fc5a081c22 /util/generic/bitops.h | |
parent | 2d37894b1b037cf24231090eda8589bbb44fb6fc (diff) | |
download | ydb-4e839db24a3bbc9f1c610c43d6faaaa99824dcca.tar.gz |
Restoring authorship annotation for <thegeorg@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/bitops.h')
-rw-r--r-- | util/generic/bitops.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/generic/bitops.h b/util/generic/bitops.h index 2db15fc59b..a66fcf4a00 100644 --- a/util/generic/bitops.h +++ b/util/generic/bitops.h @@ -216,7 +216,7 @@ static inline T FastClp2(T t) noexcept { * Check if integer is a power of 2. */ template <typename T> -Y_CONST_FUNCTION constexpr bool IsPowerOf2(T v) noexcept { +Y_CONST_FUNCTION constexpr bool IsPowerOf2(T v) noexcept { return v > 0 && (v & (v - 1)) == 0; } |