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:
parent
e0e34f6a53
commit
dc3931ec1f
@ -17,6 +17,11 @@ public:
|
|||||||
{}
|
{}
|
||||||
~MutablePriorityQueue() { clear(); }
|
~MutablePriorityQueue() { clear(); }
|
||||||
|
|
||||||
|
MutablePriorityQueue(MutablePriorityQueue &&) = default;
|
||||||
|
MutablePriorityQueue& operator=(MutablePriorityQueue &&) = default;
|
||||||
|
MutablePriorityQueue(const MutablePriorityQueue &) = default;
|
||||||
|
MutablePriorityQueue& operator=(const MutablePriorityQueue &) = default;
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
void reserve(size_t cnt) { m_heap.reserve(cnt); }
|
void reserve(size_t cnt) { m_heap.reserve(cnt); }
|
||||||
void push(const T &item);
|
void push(const T &item);
|
||||||
|
Loading…
Reference in New Issue
Block a user