diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-03-13 11:08:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-13 11:08:44 +0100 |
commit | af550e2f9822dc4ea7c06aee7d8b4f1af1d61de3 (patch) | |
tree | 90a4d68990ffee5e1b11449290ccf81cd28243b4 | |
parent | 26c12ded24305703b06e393afd9fbeb0e0cf1128 (diff) | |
parent | 31af5a31fb3d3687a65ddd5e768672dabbf8142b (diff) |
Merge pull request #8015 from RandomShaper/optimize-assert
Skip asserts on non-debug builds at compiler level
-rw-r--r-- | modules/gdscript/gd_compiler.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp index 9591740438..3f8c710674 100644 --- a/modules/gdscript/gd_compiler.cpp +++ b/modules/gdscript/gd_compiler.cpp @@ -1310,6 +1310,7 @@ Error GDCompiler::_parse_block(CodeGen &codegen, const GDParser::BlockNode *p_bl } } break; case GDParser::Node::TYPE_ASSERT: { +#ifdef DEBUG_ENABLED // try subblocks const GDParser::AssertNode *as = static_cast<const GDParser::AssertNode *>(s); @@ -1320,6 +1321,7 @@ Error GDCompiler::_parse_block(CodeGen &codegen, const GDParser::BlockNode *p_bl codegen.opcodes.push_back(GDFunction::OPCODE_ASSERT); codegen.opcodes.push_back(ret); +#endif } break; case GDParser::Node::TYPE_BREAKPOINT: { #ifdef DEBUG_ENABLED |