]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ftepp.c
Mask ftepp math constants with a compiler flag
[xonotic/gmqcc.git] / ftepp.c
diff --git a/ftepp.c b/ftepp.c
index 82495b44e3c2353ebe101af7b43dd84359882c2e..496a46a337e5571ffacd95655183a638bfa92994 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
@@ -1900,9 +1900,11 @@ ftepp_t *ftepp_create()
     ftepp_add_macro(ftepp, "__NULL__", "nil");
 
     /* add all the math constants if they can be */
-    for (i = 0; i < GMQCC_ARRAY_COUNT(ftepp_math_constants); i++)
-        if (!ftepp_macro_find(ftepp, ftepp_math_constants[i][0]))
-            ftepp_add_macro(ftepp, ftepp_math_constants[i][0], ftepp_math_constants[i][1]);
+    if (OPTS_FLAG(FTEPP_MATHDEFS)) {
+        for (i = 0; i < GMQCC_ARRAY_COUNT(ftepp_math_constants); i++)
+            if (!ftepp_macro_find(ftepp, ftepp_math_constants[i][0]))
+                ftepp_add_macro(ftepp, ftepp_math_constants[i][0], ftepp_math_constants[i][1]);
+    }
 
     return ftepp;
 }