summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskaarj <[email protected]>2022-02-10 16:52:08 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:52:08 +0300
commitc00899c2fb0e74f74e726dd4bd6915ff4d844055 (patch)
treec5a4697064da48eac1e3959b0a57362281c8596f
parentd3adae76593c2a6b659badc21bfa262bec99a298 (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
-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 43b98eeafc7..3618e0f4bfe 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 8e9d5afff9b..8b1d9a38234 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;