]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
If debug isn't enabled (-DNDEBUG=1) don't create 2 unused functions/macros for each...
authorterencehill <piuntn@gmail.com>
Sun, 18 Jun 2017 23:09:10 +0000 (01:09 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 18 Jun 2017 23:09:10 +0000 (01:09 +0200)
qcsrc/lib/_all.inc

index 136c4e7f6ffb4ff7b7dc4d56a50c62f2478c15db..b8d78cd0419e209ff8eca3a62e96240ac4d99bfe 100644 (file)
        MACRO_END
 #endif
 
-#define   is_float(this) (true || ftoe(this))
-#define isnt_float(this)
-#define   is_vector(this) (true || vtos(this))
-#define isnt_vector(this)
-#define   is_string(this) (true || stof(this))
-#define isnt_string(this)
-#define   is_entity(this) (true || etof(this))
-#define isnt_entity(this)
-bool      is_int(float this) { return this == floor(this); }
-void    isnt_int(float this) { print(ftos(this)); }
-bool      is_bool(float this) { return this == true || this == false; }
-void    isnt_bool(float this) { print(ftos(this)); }
+#if !(NDEBUG)
+       #define   is_float(this) (true || ftoe(this))
+       #define isnt_float(this)
+       #define   is_vector(this) (true || vtos(this))
+       #define isnt_vector(this)
+       #define   is_string(this) (true || stof(this))
+       #define isnt_string(this)
+       #define   is_entity(this) (true || etof(this))
+       #define isnt_entity(this)
+       bool      is_int(float this) { return this == floor(this); }
+       void    isnt_int(float this) { print(ftos(this)); }
+       bool      is_bool(float this) { return this == true || this == false; }
+       void    isnt_bool(float this) { print(ftos(this)); }
+#endif
 
 #include "warpzone/mathlib.qc"