diff --git a/src/Queue.h b/src/Queue.h index 17bb331..ccfb4ca 100644 --- a/src/Queue.h +++ b/src/Queue.h @@ -17,7 +17,7 @@ class Queue { std::mutex mutex; void run() { while (!QApplication::closingDown()){ - if (!isEmpty()) + if (tail != head) update(); std::this_thread::sleep_for(std::chrono::milliseconds(1)); } @@ -29,9 +29,6 @@ class Queue { size_t head = 0; T * container[MAX_QUEUE_SIZE]; protected: - bool isEmpty() const { - return tail == head; - } T * pop(){ mutex.lock(); T * element = container[head];