Merge pull request #66366 from asmaloney/script-fix-redundant-if

_parse_function()
This commit is contained in:
Rémi Verschelde 2022-09-26 15:50:46 +02:00
commit a587c0a45a

View File

@ -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 {