From 842085ac267ac307d465ca7ef3e5024e4e7421a0 Mon Sep 17 00:00:00 2001 From: doylet Date: Sun, 8 Jun 2025 19:20:15 +1000 Subject: [PATCH] Put DLList_ForEach into one-line --- Base/dn_base.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Base/dn_base.h b/Base/dn_base.h index e50c866..98edb98 100644 --- a/Base/dn_base.h +++ b/Base/dn_base.h @@ -494,10 +494,8 @@ DN_API bool DN_TicketMutex_CanLock (DN_TicketMutex const *mutex, DN_UInt t #define DN_DLList_HasItems(list) \ ((list) && ((list) != (list)->next)) -#define DN_DLList_ForEach(it_name, list) \ - auto *it_name = (list)->next; \ - (it_name) != (list); \ - (it_name) = (it_name)->next +#define DN_DLList_ForEach(it, list) \ + auto *it = (list)->next; (it) != (list); (it) = (it)->next \ // NOTE: Intrinsics //////////////////////////////////////////////////////////////////////////////// DN_FORCE_INLINE DN_U64 DN_Atomic_SetValue64(DN_U64 volatile *target, DN_U64 value)