diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-11-11 21:27:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-11 21:27:34 +0100 |
commit | 2a0debd0779337154dc6b0a5ad1113647402d43e (patch) | |
tree | db003f23139e8928c97e9033571a43f76a7ec47a /modules/gdscript/gdscript_function.cpp | |
parent | fb2151089cea5da6c2293894f9686db6d50fbf92 (diff) | |
parent | 635d33dc6cb2226135fadeca3a2082a3c24c3757 (diff) |
Merge pull request #43457 from reduz/refactor-builtin-methods-again
Refactor variant built-in methods yet again.
Diffstat (limited to 'modules/gdscript/gdscript_function.cpp')
-rw-r--r-- | modules/gdscript/gdscript_function.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index 59f3deb736..8372672cf7 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -1048,7 +1048,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a Callable::CallError err; if (call_ret) { GET_VARIANT_PTR(ret, argc); - base->call_ptr(*methodname, (const Variant **)argptrs, argc, ret, err); + base->call(*methodname, (const Variant **)argptrs, argc, *ret, err); #ifdef DEBUG_ENABLED if (!call_async && ret->get_type() == Variant::OBJECT) { // Check if getting a function state without await. @@ -1066,7 +1066,8 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a } #endif } else { - base->call_ptr(*methodname, (const Variant **)argptrs, argc, nullptr, err); + Variant ret; + base->call(*methodname, (const Variant **)argptrs, argc, ret, err); } #ifdef DEBUG_ENABLED if (GDScriptLanguage::get_singleton()->profiling) { |