From: terencehill Date: Sun, 18 Jun 2017 23:09:10 +0000 (+0200) Subject: If debug isn't enabled (-DNDEBUG=1) don't create 2 unused functions/macros for each... X-Git-Tag: xonotic-v0.8.5~2721 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=00dbdb9c65e604641bf6987deba5110463e5ae3d;p=xonotic%2Fxonotic-data.pk3dir.git If debug isn't enabled (-DNDEBUG=1) don't create 2 unused functions/macros for each variable type --- diff --git a/qcsrc/lib/_all.inc b/qcsrc/lib/_all.inc index 136c4e7f6..b8d78cd04 100644 --- a/qcsrc/lib/_all.inc +++ b/qcsrc/lib/_all.inc @@ -61,18 +61,20 @@ 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"