aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/containers/top_keeper/top_keeper.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:17 +0300
commitd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch)
treedd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/containers/top_keeper/top_keeper.h
parent72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff)
downloadydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/containers/top_keeper/top_keeper.h')
-rw-r--r--library/cpp/containers/top_keeper/top_keeper.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/containers/top_keeper/top_keeper.h b/library/cpp/containers/top_keeper/top_keeper.h
index b5f901a86e..2f282b5a9e 100644
--- a/library/cpp/containers/top_keeper/top_keeper.h
+++ b/library/cpp/containers/top_keeper/top_keeper.h
@@ -14,13 +14,13 @@ private:
size_t HalfMaxSize;
TComparator Comparer;
size_t MinElementIndex;
-
+
private:
void Reserve() {
Internal.reserve(2 * HalfMaxSize);
}
- template <class UT>
+ template <class UT>
bool Insert(UT&& value) noexcept {
if (Y_UNLIKELY(0 == HalfMaxSize)) {
return false;
@@ -55,7 +55,7 @@ private:
Reserve();
}
- template <class TAllocParam>
+ template <class TAllocParam>
TVectorWithMin(const size_t halfMaxSize, const TComparator& comp, TAllocParam&& param)
: Internal(std::forward<TAllocParam>(param))
, HalfMaxSize(halfMaxSize)
@@ -89,7 +89,7 @@ private:
return Insert(std::move(value));
}
- template <class... TArgs>
+ template <class... TArgs>
bool Emplace(TArgs&&... args) {
return Insert(T(std::forward<TArgs>(args)...)); // TODO: make it "real" emplace, not that fake one
}
@@ -133,7 +133,7 @@ private:
void CheckNotFinalized() {
Y_ENSURE(!Finalized, "Cannot insert after finalizing (Pop() / GetNext() / Finalize())! "
- "Use TLimitedHeap for this scenario");
+ "Use TLimitedHeap for this scenario");
}
size_t MaxSize;
@@ -158,7 +158,7 @@ public:
{
}
- template <class TAllocParam>
+ template <class TAllocParam>
TTopKeeper(size_t maxSize, const TComparator& comp, TAllocParam&& param)
: MaxSize(maxSize)
, Comparer(comp)
@@ -219,7 +219,7 @@ public:
return Internal.Push(std::move(value));
}
- template <class... TArgs>
+ template <class... TArgs>
bool Emplace(TArgs&&... args) {
CheckNotFinalized();
return Internal.Emplace(std::forward<TArgs>(args)...);
@@ -244,7 +244,7 @@ public:
void SetMaxSize(size_t newMaxSize) {
Y_ENSURE(!Finalized, "Cannot resize after finalizing (Pop() / GetNext() / Finalize())! "
- "Use TLimitedHeap for this scenario");
+ "Use TLimitedHeap for this scenario");
MaxSize = newMaxSize;
Internal.SetMaxSize(newMaxSize);
}