From 127e2333f4593e5c08c47508cf2bdc5232ef4260 Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Sat, 24 Sep 2022 12:21:25 -0400 Subject: 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. --- modules/gdscript/gdscript_compiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gdscript') 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()); } else { -- cgit v1.2.3