summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/gdscript_compiler.h')
-rw-r--r--modules/gdscript/gdscript_compiler.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/gdscript/gdscript_compiler.h b/modules/gdscript/gdscript_compiler.h
index 3a362c75bc..315d4f1842 100644
--- a/modules/gdscript/gdscript_compiler.h
+++ b/modules/gdscript/gdscript_compiler.h
@@ -110,8 +110,9 @@ class GDScriptCompiler {
}
int get_constant_pos(const Variant &p_constant) {
- if (constant_map.has(p_constant))
+ if (constant_map.has(p_constant)) {
return constant_map[p_constant];
+ }
int pos = constant_map.size();
constant_map[p_constant] = pos;
return pos;
@@ -119,12 +120,14 @@ class GDScriptCompiler {
Vector<int> opcodes;
void alloc_stack(int p_level) {
- if (p_level >= stack_max)
+ if (p_level >= stack_max) {
stack_max = p_level + 1;
+ }
}
void alloc_call(int p_params) {
- if (p_params >= call_max)
+ if (p_params >= call_max) {
call_max = p_params;
+ }
}
int current_line;