Merge pull request #56167 from cdemirer/constructor-toarray-fix

This commit is contained in:
Rémi Verschelde 2022-05-11 15:47:06 +02:00 committed by GitHub
commit b5689309f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -344,7 +344,7 @@ public:
return; return;
} }
VariantTypeChanger<Array>::change(&r_ret); r_ret = Array();
Array &dst_arr = *VariantGetInternalPtr<Array>::get_ptr(&r_ret); Array &dst_arr = *VariantGetInternalPtr<Array>::get_ptr(&r_ret);
const T &src_arr = *VariantGetInternalPtr<T>::get_ptr(p_args[0]); const T &src_arr = *VariantGetInternalPtr<T>::get_ptr(p_args[0]);
@ -356,7 +356,7 @@ public:
} }
static inline void validated_construct(Variant *r_ret, const Variant **p_args) { static inline void validated_construct(Variant *r_ret, const Variant **p_args) {
VariantTypeChanger<Array>::change(r_ret); *r_ret = Array();
Array &dst_arr = *VariantGetInternalPtr<Array>::get_ptr(r_ret); Array &dst_arr = *VariantGetInternalPtr<Array>::get_ptr(r_ret);
const T &src_arr = *VariantGetInternalPtr<T>::get_ptr(p_args[0]); const T &src_arr = *VariantGetInternalPtr<T>::get_ptr(p_args[0]);