GDScript: Fix unnecessary duplication of pointed out lines
This commit is contained in:
parent
49a196277f
commit
5dc717c5fd
|
@ -774,7 +774,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
||||||
bool result = false;
|
bool result = false;
|
||||||
if (value->get_type() == Variant::ARRAY) {
|
if (value->get_type() == Variant::ARRAY) {
|
||||||
Array *array = VariantInternal::get_array(value);
|
Array *array = VariantInternal::get_array(value);
|
||||||
result = array->get_typed_builtin() == ((uint32_t)builtin_type) && array->get_typed_class_name() == native_type && array->get_typed_script() == *script_type && array->get_typed_class_name() == native_type;
|
result = array->get_typed_builtin() == ((uint32_t)builtin_type) && array->get_typed_class_name() == native_type && array->get_typed_script() == *script_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
*dst = result;
|
*dst = result;
|
||||||
|
@ -1252,7 +1252,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
||||||
|
|
||||||
Array *array = VariantInternal::get_array(src);
|
Array *array = VariantInternal::get_array(src);
|
||||||
|
|
||||||
if (array->get_typed_builtin() != ((uint32_t)builtin_type) || array->get_typed_class_name() != native_type || array->get_typed_script() != *script_type || array->get_typed_class_name() != native_type) {
|
if (array->get_typed_builtin() != ((uint32_t)builtin_type) || array->get_typed_class_name() != native_type || array->get_typed_script() != *script_type) {
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
err_text = vformat(R"(Trying to assign an array of type "%s" to a variable of type "Array[%s]".)",
|
err_text = vformat(R"(Trying to assign an array of type "%s" to a variable of type "Array[%s]".)",
|
||||||
_get_var_type(src), _get_element_type(builtin_type, native_type, *script_type));
|
_get_var_type(src), _get_element_type(builtin_type, native_type, *script_type));
|
||||||
|
@ -2583,7 +2583,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
||||||
|
|
||||||
Array *array = VariantInternal::get_array(r);
|
Array *array = VariantInternal::get_array(r);
|
||||||
|
|
||||||
if (array->get_typed_builtin() != ((uint32_t)builtin_type) || array->get_typed_class_name() != native_type || array->get_typed_script() != *script_type || array->get_typed_class_name() != native_type) {
|
if (array->get_typed_builtin() != ((uint32_t)builtin_type) || array->get_typed_class_name() != native_type || array->get_typed_script() != *script_type) {
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
err_text = vformat(R"(Trying to return an array of type "%s" where expected return type is "Array[%s]".)",
|
err_text = vformat(R"(Trying to return an array of type "%s" where expected return type is "Array[%s]".)",
|
||||||
_get_var_type(r), _get_element_type(builtin_type, native_type, *script_type));
|
_get_var_type(r), _get_element_type(builtin_type, native_type, *script_type));
|
||||||
|
|
Loading…
Reference in New Issue