From aa73023bee1aebc745188e54039d3bf567be97e3 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Thu, 20 Feb 2025 23:47:02 +0100 Subject: Use intrusive list in logging, and add defer --- asl/containers/intrusive_list.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'asl/containers/intrusive_list.hpp') diff --git a/asl/containers/intrusive_list.hpp b/asl/containers/intrusive_list.hpp index f061740..dcf0508 100644 --- a/asl/containers/intrusive_list.hpp +++ b/asl/containers/intrusive_list.hpp @@ -34,6 +34,11 @@ class IntrusiveList public: constexpr IntrusiveList() = default; + explicit IntrusiveList(T* head) + { + push_front(head); + } + ASL_DELETE_COPY(IntrusiveList) ASL_DEFAULT_MOVE(IntrusiveList) ~IntrusiveList() = default; @@ -121,7 +126,7 @@ public: { if (!is_empty()) { - T* node = m_head->prev; + T* node = m_head->m_prev; detach(node); return node; } -- cgit