aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic
diff options
context:
space:
mode:
authorjimmy <jimmy@yandex-team.ru>2022-02-10 16:49:38 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:38 +0300
commitaffdafdb1fc09bf0bfc384355143ee6db9e90046 (patch)
treeda80bda4720043db2e41dfd1c7fd04de32021fd3 /util/generic
parent4e4faf8d95a4916a49f6674f3ff50e13799fbaa6 (diff)
downloadydb-affdafdb1fc09bf0bfc384355143ee6db9e90046.tar.gz
Restoring authorship annotation for <jimmy@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic')
-rw-r--r--util/generic/bitops.h4
-rw-r--r--util/generic/bitops_ut.cpp10
2 files changed, 7 insertions, 7 deletions
diff --git a/util/generic/bitops.h b/util/generic/bitops.h
index 2db15fc59b6..e4ff0a1a852 100644
--- a/util/generic/bitops.h
+++ b/util/generic/bitops.h
@@ -93,7 +93,7 @@ namespace NBitOps {
Y_ASSERT(value); // because __builtin_ctz* have undefined result for zero.
return __builtin_ctz(value);
}
-
+
inline unsigned CountTrailingZeroBitsImpl(unsigned long value) noexcept {
Y_ASSERT(value); // because __builtin_ctz* have undefined result for zero.
return __builtin_ctzl(value);
@@ -211,7 +211,7 @@ static inline T FastClp2(T t) noexcept {
using TCvt = typename ::TUnsignedInts::template TSelectBy<TSizeOfPredicate<sizeof(T)>::template TResult>::type;
return 1 + ::NBitOps::NPrivate::TClp2Helper<sizeof(TCvt) * 4, T>::Calc(static_cast<TCvt>(t));
}
-
+
/**
* Check if integer is a power of 2.
*/
diff --git a/util/generic/bitops_ut.cpp b/util/generic/bitops_ut.cpp
index d23c2b5c27e..96c3a61ab8b 100644
--- a/util/generic/bitops_ut.cpp
+++ b/util/generic/bitops_ut.cpp
@@ -1,7 +1,7 @@
-#include "bitops.h"
-
+#include "bitops.h"
+
#include <library/cpp/testing/unittest/registar.h>
-
+
#include <util/string/builder.h>
template <typename T>
@@ -46,11 +46,11 @@ static T ReverseBitsSlow(T v) {
// DO_NOT_STYLE
Y_UNIT_TEST_SUITE(TBitOpsTest) {
Y_UNIT_TEST(TestCountTrailingZeroBits) {
- TestCTZ<unsigned int>();
+ TestCTZ<unsigned int>();
TestCTZ<unsigned long>();
TestCTZ<unsigned long long>();
}
-
+
Y_UNIT_TEST(TestIsPowerOf2) {
UNIT_ASSERT(!IsPowerOf2(-2));
UNIT_ASSERT(!IsPowerOf2(-1));