diff options
| author | Rémi Verschelde | 2017-03-13 11:08:44 +0100 |
|---|---|---|
| committer | GitHub | 2017-03-13 11:08:44 +0100 |
| commit | af550e2f9822dc4ea7c06aee7d8b4f1af1d61de3 (patch) | |
| tree | 90a4d68990ffee5e1b11449290ccf81cd28243b4 /modules/gdscript/gd_compiler.cpp | |
| parent | 26c12ded24305703b06e393afd9fbeb0e0cf1128 (diff) | |
| parent | 31af5a31fb3d3687a65ddd5e768672dabbf8142b (diff) | |
| download | godot-af550e2f9822dc4ea7c06aee7d8b4f1af1d61de3.tar.gz godot-af550e2f9822dc4ea7c06aee7d8b4f1af1d61de3.tar.zst godot-af550e2f9822dc4ea7c06aee7d8b4f1af1d61de3.zip | |
Merge pull request #8015 from RandomShaper/optimize-assert
Skip asserts on non-debug builds at compiler level
Diffstat (limited to 'modules/gdscript/gd_compiler.cpp')
| -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 959174043..3f8c71067 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 |
