summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-11 15:47:06 +0200
committerGitHub <noreply@github.com>2022-05-11 15:47:06 +0200
commitb5689309f629dc8a3a32ea29fb8a5ebfee272179 (patch)
tree7e73082bad1d155cb18a2b5d0c5f0047aa258ee3 /core
parent9963ae3553d059e4ac3b57c7a4cdc55d1a87d49a (diff)
parentddbb4878f2936f23570087cd2d3969432fbf40e5 (diff)
Merge pull request #56167 from cdemirer/constructor-toarray-fix
Diffstat (limited to 'core')
-rw-r--r--core/variant/variant_construct.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/variant/variant_construct.h b/core/variant/variant_construct.h
index ce2e9af04f..638c0136f3 100644
--- a/core/variant/variant_construct.h
+++ b/core/variant/variant_construct.h
@@ -344,7 +344,7 @@ public:
return;
}
- VariantTypeChanger<Array>::change(&r_ret);
+ r_ret = Array();
Array &dst_arr = *VariantGetInternalPtr<Array>::get_ptr(&r_ret);
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) {
- VariantTypeChanger<Array>::change(r_ret);
+ *r_ret = Array();
Array &dst_arr = *VariantGetInternalPtr<Array>::get_ptr(r_ret);
const T &src_arr = *VariantGetInternalPtr<T>::get_ptr(p_args[0]);