From 204a7481e0c8f5fe588b5d2582ba1d6d44bc97c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Mon, 13 Mar 2017 00:17:13 +0100 Subject: [PATCH] Skip asserts on non-debug builds at compiler level --- modules/gdscript/gd_compiler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp index acc14018d6..50a13b9d09 100644 --- a/modules/gdscript/gd_compiler.cpp +++ b/modules/gdscript/gd_compiler.cpp @@ -1189,6 +1189,7 @@ Error GDCompiler::_parse_block(CodeGen& codegen,const GDParser::BlockNode *p_blo } } break; case GDParser::Node::TYPE_ASSERT: { +#ifdef DEBUG_ENABLED // try subblocks const GDParser::AssertNode *as = static_cast(s); @@ -1199,6 +1200,7 @@ Error GDCompiler::_parse_block(CodeGen& codegen,const GDParser::BlockNode *p_blo codegen.opcodes.push_back(GDFunction::OPCODE_ASSERT); codegen.opcodes.push_back(ret); +#endif } break; case GDParser::Node::TYPE_BREAKPOINT: { #ifdef DEBUG_ENABLED