summary refs log tree commit diff
path: root/src/Compute/Queue.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Compute/Queue.hpp')
-rw-r--r--src/Compute/Queue.hpp7
1 files changed, 3 insertions, 4 deletions
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 <functional>
 #include <sys/types.h>
 #include <mutex>
-#include <utility>
 #include <vector>
 #include <queue>
 #include <thread>
@@ -15,10 +14,10 @@ class Queue {
 public:
     explicit Queue(uint workers) : m_control(std::make_shared<Control>()) {
         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<X()> execute) {
         std::scoped_lock work_lock(m_control->work.mutex);
@@ -34,7 +33,7 @@ public:
         std::vector<Result> 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();