diff options
author | kcd <kcd@yandex-team.ru> | 2022-02-10 16:50:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:40 +0300 |
commit | deff230decabc1a1c89c81506c657bc3ce1d05dd (patch) | |
tree | ca48b50c41dec0636682353baaf9cdd37c8a05b0 /library | |
parent | fb1804b03a8b3964304c3233eba4e7c072b60f18 (diff) | |
download | ydb-deff230decabc1a1c89c81506c657bc3ce1d05dd.tar.gz |
Restoring authorship annotation for <kcd@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library')
4 files changed, 20 insertions, 20 deletions
diff --git a/library/cpp/containers/top_keeper/top_keeper.h b/library/cpp/containers/top_keeper/top_keeper.h index 2f282b5a9e..6ced1f6e1f 100644 --- a/library/cpp/containers/top_keeper/top_keeper.h +++ b/library/cpp/containers/top_keeper/top_keeper.h @@ -88,7 +88,7 @@ private: bool Push(T&& value) { return Insert(std::move(value)); } - + template <class... TArgs> bool Emplace(TArgs&&... args) { return Insert(T(std::forward<TArgs>(args)...)); // TODO: make it "real" emplace, not that fake one 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..6ced1f6e1f 100644 --- a/library/cpp/containers/top_keeper/top_keeper/top_keeper.h +++ b/library/cpp/containers/top_keeper/top_keeper/top_keeper.h @@ -88,7 +88,7 @@ private: bool Push(T&& value) { return Insert(std::move(value)); } - + template <class... TArgs> bool Emplace(TArgs&&... args) { return Insert(T(std::forward<TArgs>(args)...)); // TODO: make it "real" emplace, not that fake one 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..5939202c43 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 @@ -39,16 +39,16 @@ Y_UNIT_TEST_SUITE(TTopKeeperTest) { } } - // Tests on zero-size correctness + // Tests on zero-size correctness Y_UNIT_TEST(ZeroSizeCorrectnes) { - TTopKeeper<int> h(0); - for (int i = 0; i < 100; ++i) { - h.Insert(i % 10 + i / 10); - } - h.Finalize(); - UNIT_ASSERT(h.IsEmpty()); - } - + TTopKeeper<int> h(0); + for (int i = 0; i < 100; ++i) { + h.Insert(i % 10 + i / 10); + } + h.Finalize(); + UNIT_ASSERT(h.IsEmpty()); + } + // Tests SetMaxSize behaviour Y_UNIT_TEST(SetMaxSizeTest) { int m = 20000; 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..5939202c43 100644 --- a/library/cpp/containers/top_keeper/ut/top_keeper_ut.cpp +++ b/library/cpp/containers/top_keeper/ut/top_keeper_ut.cpp @@ -39,16 +39,16 @@ Y_UNIT_TEST_SUITE(TTopKeeperTest) { } } - // Tests on zero-size correctness + // Tests on zero-size correctness Y_UNIT_TEST(ZeroSizeCorrectnes) { - TTopKeeper<int> h(0); - for (int i = 0; i < 100; ++i) { - h.Insert(i % 10 + i / 10); - } - h.Finalize(); - UNIT_ASSERT(h.IsEmpty()); - } - + TTopKeeper<int> h(0); + for (int i = 0; i < 100; ++i) { + h.Insert(i % 10 + i / 10); + } + h.Finalize(); + UNIT_ASSERT(h.IsEmpty()); + } + // Tests SetMaxSize behaviour Y_UNIT_TEST(SetMaxSizeTest) { int m = 20000; |