Fix mutable priority queue being wiped when moving out of function

Without move constructor, the clean() gets called when returning an instance from a function.
This commit is contained in:
tamasmeszaros 2022-05-11 16:49:15 +02:00
parent e0e34f6a53
commit dc3931ec1f

View File

@ -17,6 +17,11 @@ public:
{}
~MutablePriorityQueue() { clear(); }
MutablePriorityQueue(MutablePriorityQueue &&) = default;
MutablePriorityQueue& operator=(MutablePriorityQueue &&) = default;
MutablePriorityQueue(const MutablePriorityQueue &) = default;
MutablePriorityQueue& operator=(const MutablePriorityQueue &) = default;
void clear();
void reserve(size_t cnt) { m_heap.reserve(cnt); }
void push(const T &item);