From 129f2e421e16bd008cdca8713cc91f67d103d94e Mon Sep 17 00:00:00 2001 From: Mel Date: Fri, 7 Jul 2023 23:05:14 +0200 Subject: Fix minor quality issues --- src/Compute/Queue.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/Compute') diff --git a/src/Compute/Queue.hpp b/src/Compute/Queue.hpp index 53acc2d..77aed7f 100644 --- a/src/Compute/Queue.hpp +++ b/src/Compute/Queue.hpp @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include @@ -15,10 +14,10 @@ class Queue { public: explicit Queue(uint workers) : m_control(std::make_shared()) { for (uint w = 0; w < workers; w++) { - std::thread thread{[=]() { Queue::run_thread(m_control); }}; + std::thread thread{[=]{ Queue::run_thread(m_control); }}; thread.detach(); } - }; + } void add(I id, float priority, std::function execute) { std::scoped_lock work_lock(m_control->work.mutex); @@ -34,7 +33,7 @@ public: std::vector done_results; std::scoped_lock result_lock(m_control->results.mutex); - for (auto r : m_control->results.results) { + for (auto &r : m_control->results.results) { done_results.push_back(r); } m_control->results.results.clear(); -- cgit 1.4.1