Skip to content

Commit

Permalink
Skip asserts on non-debug builds at compiler level
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomShaper committed Mar 12, 2017
1 parent 15c4d50 commit 31af5a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/gdscript/gd_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down

0 comments on commit 31af5a3

Please sign in to comment.