diff options
author | fippo <fippo@yandex-team.ru> | 2022-02-10 16:50:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:08 +0300 |
commit | 7bf72dabd2102d9781c1ec7a754579757baa7b90 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic | |
parent | 3e57c324d47a3a202cb3c5a9648d2f92103d5213 (diff) | |
download | ydb-7bf72dabd2102d9781c1ec7a754579757baa7b90.tar.gz |
Restoring authorship annotation for <fippo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic')
-rw-r--r-- | util/generic/queue.h | 30 | ||||
-rw-r--r-- | util/generic/utility.h | 12 | ||||
-rw-r--r-- | util/generic/utility_ut.cpp | 2 | ||||
-rw-r--r-- | util/generic/vector.h | 6 |
4 files changed, 25 insertions, 25 deletions
diff --git a/util/generic/queue.h b/util/generic/queue.h index 64d05a9efe..f5959f68f2 100644 --- a/util/generic/queue.h +++ b/util/generic/queue.h @@ -23,14 +23,14 @@ public: inline void clear() { this->c.clear(); } - - inline S& Container() { - return this->c; - } - - inline const S& Container() const { - return this->c; - } + + inline S& Container() { + return this->c; + } + + inline const S& Container() const { + return this->c; + } }; template <class T, class S, class C> @@ -48,11 +48,11 @@ public: this->c.clear(); } - inline S& Container() { - return this->c; - } - - inline const S& Container() const { - return this->c; - } + inline S& Container() { + return this->c; + } + + inline const S& Container() const { + return this->c; + } }; diff --git a/util/generic/utility.h b/util/generic/utility.h index e91a799cf1..43b98eeafc 100644 --- a/util/generic/utility.h +++ b/util/generic/utility.h @@ -11,9 +11,9 @@ static constexpr const T& Min(const T& l, const T& r) { template <typename T, typename... Args> static constexpr const T& Min(const T& a, const T& b, const Args&... args) { - return Min(a, Min(b, args...)); -} - + return Min(a, Min(b, args...)); +} + template <class T> static constexpr const T& Max(const T& l, const T& r) { return l < r ? r : l; @@ -21,9 +21,9 @@ static constexpr const T& Max(const T& l, const T& r) { template <typename T, typename... Args> static constexpr const T& Max(const T& a, const T& b, const Args&... args) { - return Max(a, Max(b, args...)); -} - + return Max(a, Max(b, 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) { diff --git a/util/generic/utility_ut.cpp b/util/generic/utility_ut.cpp index c232d93822..8e9d5afff9 100644 --- a/util/generic/utility_ut.cpp +++ b/util/generic/utility_ut.cpp @@ -50,7 +50,7 @@ Y_UNIT_TEST_SUITE(TUtilityTest) { TTest j(1); DoSwap(i, j); - + UNIT_ASSERT_EQUAL(i.Val, 1); UNIT_ASSERT_EQUAL(j.Val, 0); } diff --git a/util/generic/vector.h b/util/generic/vector.h index 9af65ce700..a5b258955a 100644 --- a/util/generic/vector.h +++ b/util/generic/vector.h @@ -125,8 +125,8 @@ public: #endif inline void crop(size_type size) { - if (this->size() > size) { + if (this->size() > size) { this->erase(this->begin() + size, this->end()); - } - } + } + } }; |