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 | 60d56d38e3ce2a628b457bdf5f4c711b244f23ef (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp | |
parent | deff230decabc1a1c89c81506c657bc3ce1d05dd (diff) | |
download | ydb-60d56d38e3ce2a628b457bdf5f4c711b244f23ef.tar.gz |
Restoring authorship annotation for <kcd@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp')
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 6ced1f6e1fd..2f282b5a9e1 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 6ced1f6e1fd..2f282b5a9e1 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 5939202c433..a938279025d 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 5939202c433..a938279025d 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; |