]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/iter.qh
Uncrustify lib/*
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / iter.qh
index 53b3d662992f23668fc77be6e45a4cb91a0422d2..b0a602c963b9d834b89afafd7eb9352c98fb0f57 100644 (file)
@@ -1,19 +1,27 @@
 #ifndef ITER_H
 #define ITER_H
 
-#define FOREACH_ARRAY(arr, start, end, cond, body) do { \
-    for (int i = start; i < end; ++i) {                 \
-        const noref entity it = arr[i];                 \
-        if (cond) { body }                              \
-    }                                                   \
-} while(0)
+#define FOREACH_ARRAY(arr, start, end, cond, body) \
+       do \
+       { \
+               for (int i = start; i < end; ++i) \
+               {                 \
+                       const noref entity it = arr[i];                 \
+                       if (cond) { body }                              \
+               }                                                   \
+       } \
+       while (0)
 
-#define FOREACH_LIST(list, next, cond, body) do {               \
-    noref int i = 0;                                            \
-    for (entity it = list##_first; it; (it = it.next, ++i)) {   \
-        if (cond) { body }                                      \
-    }                                                           \
-} while(0)
+#define FOREACH_LIST(list, next, cond, body) \
+       do \
+       {               \
+               noref int i = 0;                                            \
+               for (entity it = list##_first; it; (it = it.next, ++i)) \
+               {   \
+                       if (cond) { body }                                      \
+               }                                                           \
+       } \
+       while (0)
 
 #define FOREACH(list, cond, body) FOREACH_LIST(list, enemy, cond, body)