diff options
author | toropov <toropov@yandex-team.ru> | 2022-02-10 16:50:53 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:53 +0300 |
commit | 309225f8699fc260ad3bd69fffa136d853889031 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 | |
parent | 4b0fc373fedd49d8651b5fba2371df503910c126 (diff) | |
download | ydb-309225f8699fc260ad3bd69fffa136d853889031.tar.gz |
Restoring authorship annotation for <toropov@yandex-team.ru>. Commit 2 of 2.
-rw-r--r-- | library/cpp/ipv6_address/ipv6_address.h | 12 | ||||
-rw-r--r-- | util/generic/is_in.h | 6 | ||||
-rw-r--r-- | util/generic/is_in_ut.cpp | 14 |
3 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/ipv6_address/ipv6_address.h b/library/cpp/ipv6_address/ipv6_address.h index 8c47def82d..1d7eb0b65f 100644 --- a/library/cpp/ipv6_address/ipv6_address.h +++ b/library/cpp/ipv6_address/ipv6_address.h @@ -115,13 +115,13 @@ public: } constexpr bool operator<=(const TIpv6Address& other) const noexcept { - return !(*this > other); - } - + return !(*this > other); + } + constexpr bool operator>=(const TIpv6Address& other) const noexcept { - return !(*this < other); - } - + return !(*this < other); + } + constexpr operator ui128() const noexcept { return Ip; } diff --git a/util/generic/is_in.h b/util/generic/is_in.h index 8a6f585f53..4f175ea5eb 100644 --- a/util/generic/is_in.h +++ b/util/generic/is_in.h @@ -22,9 +22,9 @@ namespace NIsInHelper { template <class C, class T, bool isAssoc> struct TIsInTraits { static bool IsIn(const C& c, const T& e) { - using std::begin; - using std::end; - return ::IsIn(begin(c), end(c), e); + using std::begin; + using std::end; + return ::IsIn(begin(c), end(c), e); } }; diff --git a/util/generic/is_in_ut.cpp b/util/generic/is_in_ut.cpp index 17a9339095..c668bce807 100644 --- a/util/generic/is_in_ut.cpp +++ b/util/generic/is_in_ut.cpp @@ -104,13 +104,13 @@ Y_UNIT_TEST_SUITE(TIsIn) { UNIT_ASSERT(IsIn(TVector<TStringBuf>({"a", "b", "c"}), b.data())); UNIT_ASSERT(IsIn(TVector<TStringBuf>({"a", "b", "c"}), "b")); } - - Y_UNIT_TEST(IsInArrayTest) { + + Y_UNIT_TEST(IsInArrayTest) { const TString array[] = {"a", "b", "d"}; - - UNIT_ASSERT(IsIn(array, "a")); - UNIT_ASSERT(IsIn(array, TString("b"))); - UNIT_ASSERT(!IsIn(array, "c")); + + UNIT_ASSERT(IsIn(array, "a")); + UNIT_ASSERT(IsIn(array, TString("b"))); + UNIT_ASSERT(!IsIn(array, "c")); UNIT_ASSERT(IsIn(array, TStringBuf("d"))); - } + } } |