From dc3931ec1f3955ce546fa51661aab56c96f38a5e Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Wed, 11 May 2022 16:49:15 +0200 Subject: [PATCH] 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. --- src/libslic3r/MutablePriorityQueue.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libslic3r/MutablePriorityQueue.hpp b/src/libslic3r/MutablePriorityQueue.hpp index cc1cae68c..a9fcba6ab 100644 --- a/src/libslic3r/MutablePriorityQueue.hpp +++ b/src/libslic3r/MutablePriorityQueue.hpp @@ -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);