diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-03 12:23:00 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-03 12:23:00 +0100 |
commit | 4e360ac61264f1e54e14f776c32cc82cde13d76a (patch) | |
tree | 2e3296ee26ad0a7c5352abae6ead910293fdae7a /core/variant/variant_call.cpp | |
parent | 1b634c06d08c99f176122331f697e6525a76bf01 (diff) | |
parent | bc739a46878d06bd77fcb924a8bd079071057be0 (diff) |
Merge pull request #70702 from vnen/gdscript-error-on-assign-void
GDScript: Error when assigning return value of void function
Diffstat (limited to 'core/variant/variant_call.cpp')
-rw-r--r-- | core/variant/variant_call.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index ac569941bf..57d62dac91 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -65,11 +65,13 @@ static _FORCE_INLINE_ void vc_method_call(R (T::*method)(P...) const, Variant *b template <class T, class... P> static _FORCE_INLINE_ void vc_method_call(void (T::*method)(P...), Variant *base, const Variant **p_args, int p_argcount, Variant &r_ret, const Vector<Variant> &p_defvals, Callable::CallError &r_error) { + VariantInternal::clear(&r_ret); call_with_variant_args_dv(VariantGetInternalPtr<T>::get_ptr(base), method, p_args, p_argcount, r_error, p_defvals); } template <class T, class... P> static _FORCE_INLINE_ void vc_method_call(void (T::*method)(P...) const, Variant *base, const Variant **p_args, int p_argcount, Variant &r_ret, const Vector<Variant> &p_defvals, Callable::CallError &r_error) { + VariantInternal::clear(&r_ret); call_with_variant_argsc_dv(VariantGetInternalPtr<T>::get_ptr(base), method, p_args, p_argcount, r_error, p_defvals); } |