aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic
diff options
context:
space:
mode:
authorskaarj <skaarj@yandex-team.ru>2022-02-10 16:52:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:52:08 +0300
commitf3025ec0ed0862caab12b2f5d1f9c62325086b3a (patch)
treeab7fbbf3253d4c0e2793218f09378908beb025fb /util/generic
parentc00899c2fb0e74f74e726dd4bd6915ff4d844055 (diff)
downloadydb-f3025ec0ed0862caab12b2f5d1f9c62325086b3a.tar.gz
Restoring authorship annotation for <skaarj@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic')
-rw-r--r--util/generic/utility.h4
-rw-r--r--util/generic/utility_ut.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/util/generic/utility.h b/util/generic/utility.h
index 3618e0f4bf..43b98eeafc 100644
--- a/util/generic/utility.h
+++ b/util/generic/utility.h
@@ -26,8 +26,8 @@ static constexpr const T& Max(const T& a, const T& b, const Args&... args) {
// replace with http://en.cppreference.com/w/cpp/algorithm/clamp in c++17
template <class T>
-constexpr const T& ClampVal(const T& val, const T& min, const T& max) {
- return val < min ? min : (max < val ? max : val);
+constexpr const T& ClampVal(const T& val, const T& min, const T& max) {
+ return val < min ? min : (max < val ? max : val);
}
template <typename T = double, typename... Args>
diff --git a/util/generic/utility_ut.cpp b/util/generic/utility_ut.cpp
index 8b1d9a3823..8e9d5afff9 100644
--- a/util/generic/utility_ut.cpp
+++ b/util/generic/utility_ut.cpp
@@ -118,7 +118,7 @@ Y_UNIT_TEST_SUITE(TUtilityTest) {
UNIT_ASSERT_EQUAL(byte, byte);
}
}
-
+
Y_UNIT_TEST(TestClampValNoClamp) {
double val = 2;
double lo = 1;
@@ -127,7 +127,7 @@ Y_UNIT_TEST_SUITE(TUtilityTest) {
UNIT_ASSERT_EQUAL(clamped, val);
UNIT_ASSERT_EQUAL(&clamped, &val);
}
-
+
Y_UNIT_TEST(TestClampValLo) {
double val = 2;
double lo = 3;
@@ -136,7 +136,7 @@ Y_UNIT_TEST_SUITE(TUtilityTest) {
UNIT_ASSERT_EQUAL(clamped, lo);
UNIT_ASSERT_EQUAL(&clamped, &lo);
}
-
+
Y_UNIT_TEST(TestClampValHi) {
double val = 4;
double lo = 3;