From 188c0ee932302706b71b7f1b6b248349448f631e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 21 Nov 2016 10:28:06 +0100 Subject: [PATCH] - removed the REGT_NIL check from the PARAM_EXISTS macro, because with the implemented handling of named arguments it isn't possible that REGT_NIL can end up in the parameters without a programming error.. --- src/scripting/vm/vm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripting/vm/vm.h b/src/scripting/vm/vm.h index ab1708e08..b8885e0a1 100644 --- a/src/scripting/vm/vm.h +++ b/src/scripting/vm/vm.h @@ -956,7 +956,7 @@ void VMDisasm(FILE *out, const VMOP *code, int codesize, const VMScriptFunction #define PARAM_OBJECT_AT(p,x,type) assert((p) < numparam); assert(param[p].Type == REGT_POINTER && (param[p].atag == ATAG_OBJECT || param[p].a == NULL)); type *x = (type *)param[p].a; assert(x == NULL || x->IsKindOf(RUNTIME_CLASS(type))); #define PARAM_CLASS_AT(p,x,base) assert((p) < numparam); assert(param[p].Type == REGT_POINTER && (param[p].atag == ATAG_OBJECT || param[p].a == NULL)); base::MetaClass *x = (base::MetaClass *)param[p].a; assert(x == NULL || x->IsDescendantOf(RUNTIME_CLASS(base))); -#define PARAM_EXISTS(p) ((p) < numparam && param[p].Type != REGT_NIL) +#define PARAM_EXISTS(p) ((p) < numparam) #define ASSERTINT(p) assert((p).Type == REGT_INT) #define ASSERTFLOAT(p) assert((p).Type == REGT_FLOAT) #define ASSERTSTRING(p) assert((p).Type == REGT_STRING)