From 1d2397119648fb79312244363bbc74ea0284b31a Mon Sep 17 00:00:00 2001 From: Michael Mueller Date: Fri, 25 Apr 2025 19:42:54 +0200 Subject: [PATCH] ealanos: Fixed compiler errors when using MPSCQueue with polymorphic objects. --- repos/ealanos/include/ealanos/util/mpsc_queue.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/repos/ealanos/include/ealanos/util/mpsc_queue.h b/repos/ealanos/include/ealanos/util/mpsc_queue.h index eee0d10f52..f39bc7bd86 100644 --- a/repos/ealanos/include/ealanos/util/mpsc_queue.h +++ b/repos/ealanos/include/ealanos/util/mpsc_queue.h @@ -50,7 +50,7 @@ public: */ [[nodiscard]] const T *end() const noexcept { return _end; } - [[nodiscard]] T *head() noexcept { return _head; } + [[nodiscard]] T *head() noexcept { return reinterpret_cast(_stub).next(); } /** * @return True, when the queue is empty. @@ -81,8 +81,8 @@ private: template T *MPSCQueue::pop_front() noexcept { - auto *tail = this->_tail; - auto *next = tail->next(); + T *tail = this->_tail; + T *next = tail->next(); if (tail == this->_end) { @@ -102,7 +102,7 @@ template T *MPSCQueue::pop_front() noexcept return tail; } - const auto *head = this->_head; + const T *head = this->_head; if (tail != head) { return nullptr;