From 481229da974627f1c361bce3c256ae440cb4d701 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 24 Oct 2018 11:05:19 +0200 Subject: [PATCH] CancellationCallback is now passed by value, instead of non-const reference (which would require initializing the reference from temporaries) --- src/libslic3r/Print.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/Print.hpp b/src/libslic3r/Print.hpp index bd04cd371..a00ef5c9e 100644 --- a/src/libslic3r/Print.hpp +++ b/src/libslic3r/Print.hpp @@ -86,7 +86,7 @@ public: // In case the step has already been entered or finished, cancel the background // processing by calling the cancel callback. template - bool invalidate(StepType step, tbb::mutex &mtx, CancelationCallback &cancel) { + bool invalidate(StepType step, tbb::mutex &mtx, CancelationCallback cancel) { bool invalidated = m_state[step].load(std::memory_order_relaxed) != INVALID; if (invalidated) { #if 0 @@ -109,7 +109,7 @@ public: // In case any step has already been entered or finished, cancel the background // processing by calling the cancel callback. template - bool invalidate_all(tbb::mutex &mtx, CancelationCallback &cancel) { + bool invalidate_all(tbb::mutex &mtx, CancelationCallback cancel) { bool invalidated = false; for (size_t i = 0; i < COUNT; ++ i) if (m_state[i].load(std::memory_order_relaxed) != INVALID) {