diff options
| author | Max Hilbrunner | 2018-05-23 23:07:24 +0200 |
|---|---|---|
| committer | GitHub | 2018-05-23 23:07:24 +0200 |
| commit | 34e9e5ba3720611834b54f5bf37214cb878c486e (patch) | |
| tree | 91ae5c4bab4f1e8eb93faa3a9923f3d3bf2ad770 /modules/gdscript/gdscript_compiler.cpp | |
| parent | d55351ed20def8c84e36435ce8c85a1701b73ffd (diff) | |
| parent | 3cec24baa850019f9968b4e04e9c79fbddee3b72 (diff) | |
| download | godot-34e9e5ba3720611834b54f5bf37214cb878c486e.tar.gz godot-34e9e5ba3720611834b54f5bf37214cb878c486e.tar.zst godot-34e9e5ba3720611834b54f5bf37214cb878c486e.zip | |
Merge pull request #19129 from vnen/positive-fix
Fix positive operator in GDScript compiler
Diffstat (limited to 'modules/gdscript/gdscript_compiler.cpp')
| -rw-r--r-- | modules/gdscript/gdscript_compiler.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index 994751244..5c834966c 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -738,6 +738,9 @@ int GDScriptCompiler::_parse_expression(CodeGen &codegen, const GDScriptParser:: case GDScriptParser::OperatorNode::OP_NEG: { if (!_create_unary_operator(codegen, on, Variant::OP_NEGATE, p_stack_level)) return -1; } break; + case GDScriptParser::OperatorNode::OP_POS: { + if (!_create_unary_operator(codegen, on, Variant::OP_POSITIVE, p_stack_level)) return -1; + } break; case GDScriptParser::OperatorNode::OP_NOT: { if (!_create_unary_operator(codegen, on, Variant::OP_NOT, p_stack_level)) return -1; } break; |
