Skip to content

Commit

Permalink
Fix special build
Browse files Browse the repository at this point in the history
  • Loading branch information
KochetovNicolai committed Dec 22, 2020
1 parent 12f0f82 commit 74671bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Functions/FunctionsStringHash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,24 +295,24 @@ class FixedHeap
public:
FixedHeap() = delete;

explicit FixedHeap(F f_) : f(f_), data_t(std::make_shared<std::vector<size_t>>(K, v))
explicit FixedHeap(F f_) : f(f_), data_t(std::make_shared<std::vector<UInt64>>(K, v))
{
std::make_heap(data_t->begin(), data_t->end(), f);
}

void insertAndReplace(size_t new_v)
void insertAndReplace(UInt64 new_v)
{
data_t->push_back(new_v);
std::push_heap(data_t->begin(), data_t->end(), f);
std::pop_heap(data_t->begin(), data_t->end(), f);
data_t->pop_back();
}

const size_t * data() { return data_t->data(); }
const UInt64 * data() { return data_t->data(); }

private:
F f;
std::shared_ptr<std::vector<size_t>> data_t;
std::shared_ptr<std::vector<UInt64>> data_t;
};


Expand Down

0 comments on commit 74671bd

Please sign in to comment.