4#include "../Foundation/Assert.h"
9struct IntrusiveDoubleLinkedList;
26 [[nodiscard]] T* peekFront()
const {
return front; }
28 [[nodiscard]]
bool isEmpty()
const {
return peekFront() ==
nullptr; }
32 for (T* current = front; current !=
nullptr;)
34 T* next =
static_cast<T*
>(current->next);
35 current->next =
nullptr;
36 current->prev =
nullptr;
50 queueBackUnchecked(*other.front, *other.back);
55 void queueBack(T& item)
58 queueBackUnchecked(item, item);
62 void queueBackUnchecked(T& item, T& newBack)
80 [[nodiscard]] T* dequeueFront()
87 front =
static_cast<T*
>(item->next);
90 front->prev =
nullptr;
103#if SC_CONFIGURATION_DEBUG
113 it =
static_cast<T*
>(it->next);
119 front =
static_cast<T*
>(front->next);
123 back =
static_cast<T*
>(back->prev);
126 T* next =
static_cast<T*
>(item.next);
127 T* prev =
static_cast<T*
>(item.prev);
#define SC_ASSERT_DEBUG(e)
Assert expression e to be true.
Definition: Assert.h:82
An Intrusive Double Linked List.
Definition: IntrusiveDoubleLinkedList.h:22