From 279b1e27dcb89e8439ebd17c1a0b4940ef29c250 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 22 Jun 2017 09:45:09 +0300 Subject: [PATCH] Made usage of assertions in VM code consistent https://forum.zdoom.org/viewtopic.php?t=56995 --- src/dobject.h | 2 +- src/scripting/vm/vm.h | 2 +- src/scripting/vm/vmexec.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dobject.h b/src/dobject.h index d043dfada..5cf877fed 100644 --- a/src/dobject.h +++ b/src/dobject.h @@ -198,7 +198,7 @@ protected: enum { MetaClassNum = CLASSREG_PClass }; // Per-instance variables. There are four. -#ifdef _DEBUG +#ifndef NDEBUG public: enum { diff --git a/src/scripting/vm/vm.h b/src/scripting/vm/vm.h index 765ba4555..e5f7d1357 100644 --- a/src/scripting/vm/vm.h +++ b/src/scripting/vm/vm.h @@ -376,7 +376,7 @@ int VMCall(VMFunction *func, VMValue *params, int numparams, VMReturn *results, // variable name at position

void NullParam(const char *varname); -#ifdef _DEBUG +#ifndef NDEBUG bool AssertObject(void * ob); #endif diff --git a/src/scripting/vm/vmexec.cpp b/src/scripting/vm/vmexec.cpp index cc88a0eaa..252371c40 100644 --- a/src/scripting/vm/vmexec.cpp +++ b/src/scripting/vm/vmexec.cpp @@ -229,7 +229,7 @@ void VMFillParams(VMValue *params, VMFrame *callee, int numparam) } -#ifdef _DEBUG +#ifndef NDEBUG bool AssertObject(void * ob) { auto obj = (DObject*)ob;