diff options
Diffstat (limited to 'core/variant/callable_bind.cpp')
-rw-r--r-- | core/variant/callable_bind.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/variant/callable_bind.cpp b/core/variant/callable_bind.cpp index 4713a49303..83035dc70d 100644 --- a/core/variant/callable_bind.cpp +++ b/core/variant/callable_bind.cpp @@ -87,6 +87,10 @@ const Callable *CallableCustomBind::get_base_comparator() const { return &callable; } +int CallableCustomBind::get_bound_arguments_count() const { + return callable.get_bound_arguments_count() + binds.size(); +} + void CallableCustomBind::call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const { const Variant **args = (const Variant **)alloca(sizeof(const Variant **) * (binds.size() + p_argcount)); for (int i = 0; i < p_argcount; i++) { @@ -164,6 +168,10 @@ const Callable *CallableCustomUnbind::get_base_comparator() const { return &callable; } +int CallableCustomUnbind::get_bound_arguments_count() const { + return callable.get_bound_arguments_count() - argcount; +} + void CallableCustomUnbind::call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const { if (argcount > p_argcount) { r_call_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS; |