From: TimePath Date: Sat, 3 Oct 2015 08:46:22 +0000 (+1000) Subject: Spawnfuncs: don't check field types, increases compile time too much X-Git-Tag: xonotic-v0.8.2~1884 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=73b0133c93e101096ef29528d2c35beced0d46af;p=xonotic%2Fxonotic-data.pk3dir.git Spawnfuncs: don't check field types, increases compile time too much --- diff --git a/qcsrc/lib/spawnfunc.qh b/qcsrc/lib/spawnfunc.qh index c474104d6..00c9be135 100644 --- a/qcsrc/lib/spawnfunc.qh +++ b/qcsrc/lib/spawnfunc.qh @@ -5,6 +5,8 @@ noref bool require_spawnfunc_prefix; .bool spawnfunc_checked; +// Optional type checking; increases compile time too much to be enabled by default +#if 0 bool entityfieldassignablefromeditor(int i) { switch (entityfieldtype(i)) { case FIELD_STRING: @@ -17,6 +19,9 @@ bool entityfieldassignablefromeditor(int i) { #define _spawnfunc_checktypes(fld) if (fieldname == #fld) \ if (!entityfieldassignablefromeditor(i)) LOG_FATALF("Entity field '%s' cannot be whitelisted\n", fieldname); +#else +#define _spawnfunc_checktypes(fld) +#endif #define _spawnfunc_check(fld) if (fieldname == #fld) \ continue;