summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_compiler.cpp
diff options
context:
space:
mode:
authorAndy Maloney <asmaloney@gmail.com>2022-09-24 12:21:25 -0400
committerAndy Maloney <asmaloney@gmail.com>2022-09-24 12:30:43 -0400
commit127e2333f4593e5c08c47508cf2bdc5232ef4260 (patch)
tree5203d73cff5dc2ef90c180e2225375ed0205abf5 /modules/gdscript/gdscript_compiler.cpp
parentf74491fdee9bc2d68668137fbacd8f3a7e7e8df7 (diff)
Remove redundant "if" condition in GDScriptCompiler::_parse_function()
Looking at the original PR, I believe this is the original intent, but it now means that previously dead code is now executed.
Diffstat (limited to 'modules/gdscript/gdscript_compiler.cpp')
-rw-r--r--modules/gdscript/gdscript_compiler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index 00e8223b9a..fd418ced47 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/modules/gdscript/gdscript_compiler.cpp
@@ -2041,7 +2041,7 @@ GDScriptFunction *GDScriptCompiler::_parse_function(Error &r_error, GDScript *p_
codegen.generator->write_newline(field->initializer->start_line);
// For typed arrays we need to make sure this is already initialized correctly so typed assignment work.
- if (field_type.is_hard_type() && field_type.builtin_type == Variant::ARRAY && field_type.has_container_element_type()) {
+ if (field_type.is_hard_type() && field_type.builtin_type == Variant::ARRAY) {
if (field_type.has_container_element_type()) {
codegen.generator->write_construct_typed_array(dst_address, _gdtype_from_datatype(field_type.get_container_element_type(), codegen.script), Vector<GDScriptCodeGenerator::Address>());
} else {