]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/util-pre.qh
Support #ifdef in item declarations
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / util-pre.qh
index fbc43bdc5c8fb34c58391d9b0b7fba4eebf1bd20..45a37302274e7ebffbef036f49f16e8119c22581 100644 (file)
 #define MAP_19(f, it, ...) f(it)MAP_18(f, __VA_ARGS__)
 #define MAP_20(f, it, ...) f(it)MAP_19(f, __VA_ARGS__)
 
+#define IDENTITY(it) it
+
+#ifdef SVQC
+    #define SV(f, ...) f(__VA_ARGS__)
+#else
+    #define SV(f, ...)
+#endif
+
+#ifdef CSQC
+    #define CL(f, ...) f(__VA_ARGS__)
+#else
+    #define CL(f, ...)
+#endif
+
+#define ALL(f, ...) f(__VA_ARGS__)
+
+#define IF(pred, f, ...) pred(f, __VA_ARGS__)
+
 #define BIT(n) (1 << (n))
 #ifndef BRANCHLESS_BITSET
     #define BITSET(var, mask, flag) (flag ? (var) | (mask) : (var) &~ (mask))