]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/linkedlist.qh
Merge branch 'master' into Mario/showspecs
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / linkedlist.qh
index b56493748a3b527ba0689e45cf898d27c367b430..6afc862ed0a6306b97e2ad5ca02702b3a79a4817 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef LINKEDLIST_H
-#define LINKEDLIST_H
+#pragma once
 
 CLASS(LinkedListNode, Object)
        ATTRIB(LinkedListNode, ll_data, entity, NULL)
@@ -68,7 +67,7 @@ entity LL_POP(LinkedList this)
 #define LL_DELETE_2(this, dtor) \
        MACRO_BEGIN \
        { \
-               LL_CLEAR(this, dtor); \
+               LL_CLEAR_2(this, dtor); \
                remove(this); \
                this = NULL; \
        } MACRO_END
@@ -79,9 +78,7 @@ entity LL_POP(LinkedList this)
                noref int i = 0;                                                \
                for (entity _it = list.ll_head; _it; (_it = _it.ll_next, ++i))  \
                {                                                               \
-                       noref entity it = _it.ll_data;                              \
+                       ITER_CONST noref entity it = _it.ll_data;                   \
                        if (cond) { body }                                          \
                }                                                               \
        } MACRO_END
-
-#endif