diff options
author | dpaveldev <dpaveldev@yandex-team.ru> | 2022-02-10 16:49:26 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:26 +0300 |
commit | 673dba906d2cf09717ad91dd039ff76f310162a0 (patch) | |
tree | 269445b0dfc2a2d6c3888f75960bff988c8250d4 | |
parent | ba0318ad2edf77bcc1b6726ad16adfa45ab8b6d5 (diff) | |
download | ydb-673dba906d2cf09717ad91dd039ff76f310162a0.tar.gz |
Restoring authorship annotation for <dpaveldev@yandex-team.ru>. Commit 1 of 2.
5 files changed, 65 insertions, 65 deletions
diff --git a/library/cpp/containers/top_keeper/top_keeper.h b/library/cpp/containers/top_keeper/top_keeper.h index 2f282b5a9e..df891568c3 100644 --- a/library/cpp/containers/top_keeper/top_keeper.h +++ b/library/cpp/containers/top_keeper/top_keeper.h @@ -108,15 +108,15 @@ private: return Internal; } - auto Extract() { - using std::swap; - - decltype(Internal) values; - swap(Internal, values); - Reset(); - return values; - } - + auto Extract() { + using std::swap; + + decltype(Internal) values; + swap(Internal, values); + Reset(); + return values; + } + const T& Back() const { return Internal.back(); } @@ -204,11 +204,11 @@ public: return value; } - auto Extract() { - Finalize(); - return Internal.Extract(); - } - + auto Extract() { + Finalize(); + return Internal.Extract(); + } + bool Insert(const T& value) { CheckNotFinalized(); return Internal.Push(value); diff --git a/library/cpp/containers/top_keeper/top_keeper/top_keeper.h b/library/cpp/containers/top_keeper/top_keeper/top_keeper.h index 2f282b5a9e..df891568c3 100644 --- a/library/cpp/containers/top_keeper/top_keeper/top_keeper.h +++ b/library/cpp/containers/top_keeper/top_keeper/top_keeper.h @@ -108,15 +108,15 @@ private: return Internal; } - auto Extract() { - using std::swap; - - decltype(Internal) values; - swap(Internal, values); - Reset(); - return values; - } - + auto Extract() { + using std::swap; + + decltype(Internal) values; + swap(Internal, values); + Reset(); + return values; + } + const T& Back() const { return Internal.back(); } @@ -204,11 +204,11 @@ public: return value; } - auto Extract() { - Finalize(); - return Internal.Extract(); - } - + auto Extract() { + Finalize(); + return Internal.Extract(); + } + bool Insert(const T& value) { CheckNotFinalized(); return Internal.Push(value); diff --git a/library/cpp/containers/top_keeper/top_keeper/ut/top_keeper_ut.cpp b/library/cpp/containers/top_keeper/top_keeper/ut/top_keeper_ut.cpp index a938279025..c5306afe15 100644 --- a/library/cpp/containers/top_keeper/top_keeper/ut/top_keeper_ut.cpp +++ b/library/cpp/containers/top_keeper/top_keeper/ut/top_keeper_ut.cpp @@ -202,21 +202,21 @@ Y_UNIT_TEST_SUITE(TTopKeeperTest) { } k.Finalize(); } - - Y_UNIT_TEST(ExtractTest) { - TTopKeeper<size_t> keeper(100); - for (size_t i = 0; i < 100; ++i) { - keeper.Insert(i); - } - - auto values = keeper.Extract(); - UNIT_ASSERT_EQUAL(values.size(), 100); - Sort(values); - - for (size_t i = 0; i < 100; ++i) { - UNIT_ASSERT_EQUAL(values[i], i); - } - - UNIT_ASSERT(keeper.IsEmpty()); - } + + Y_UNIT_TEST(ExtractTest) { + TTopKeeper<size_t> keeper(100); + for (size_t i = 0; i < 100; ++i) { + keeper.Insert(i); + } + + auto values = keeper.Extract(); + UNIT_ASSERT_EQUAL(values.size(), 100); + Sort(values); + + for (size_t i = 0; i < 100; ++i) { + UNIT_ASSERT_EQUAL(values[i], i); + } + + UNIT_ASSERT(keeper.IsEmpty()); + } } diff --git a/library/cpp/containers/top_keeper/ut/top_keeper_ut.cpp b/library/cpp/containers/top_keeper/ut/top_keeper_ut.cpp index a938279025..c5306afe15 100644 --- a/library/cpp/containers/top_keeper/ut/top_keeper_ut.cpp +++ b/library/cpp/containers/top_keeper/ut/top_keeper_ut.cpp @@ -202,21 +202,21 @@ Y_UNIT_TEST_SUITE(TTopKeeperTest) { } k.Finalize(); } - - Y_UNIT_TEST(ExtractTest) { - TTopKeeper<size_t> keeper(100); - for (size_t i = 0; i < 100; ++i) { - keeper.Insert(i); - } - - auto values = keeper.Extract(); - UNIT_ASSERT_EQUAL(values.size(), 100); - Sort(values); - - for (size_t i = 0; i < 100; ++i) { - UNIT_ASSERT_EQUAL(values[i], i); - } - - UNIT_ASSERT(keeper.IsEmpty()); - } + + Y_UNIT_TEST(ExtractTest) { + TTopKeeper<size_t> keeper(100); + for (size_t i = 0; i < 100; ++i) { + keeper.Insert(i); + } + + auto values = keeper.Extract(); + UNIT_ASSERT_EQUAL(values.size(), 100); + Sort(values); + + for (size_t i = 0; i < 100; ++i) { + UNIT_ASSERT_EQUAL(values[i], i); + } + + UNIT_ASSERT(keeper.IsEmpty()); + } } diff --git a/library/cpp/enumbitset/enumbitset.h b/library/cpp/enumbitset/enumbitset.h index 41864c3a04..68ed89d0cc 100644 --- a/library/cpp/enumbitset/enumbitset.h +++ b/library/cpp/enumbitset/enumbitset.h @@ -371,7 +371,7 @@ public: return Value != other.Value; } - TIterator& operator++() noexcept { + TIterator& operator++() noexcept { Y_ASSERT(Value < EndIndex); TEnum res; if (BitMap->FindNext(static_cast<TEnum>(Value), res)) { @@ -379,8 +379,8 @@ public: } else { Value = EndIndex; } - - return *this; + + return *this; } private: |