summaryrefslogtreecommitdiff
path: root/core/variant/callable.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-07-29 18:10:39 +0200
committerGitHub <noreply@github.com>2022-07-29 18:10:39 +0200
commit7199314eb39408da4f9f7286452c980a3d3da1c9 (patch)
treebde2b775cfcc20c77c8424b4c038a7553b344226 /core/variant/callable.h
parent5352cf8e2fafb0c974e3ba68ff8e3c2ce80d449e (diff)
parentd4433ae6d3a525683ef37ea521d30b6b97a44024 (diff)
Merge pull request #63595 from reduz/remove-signal-connect-binds
Remove Signal connect binds
Diffstat (limited to 'core/variant/callable.h')
-rw-r--r--core/variant/callable.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/core/variant/callable.h b/core/variant/callable.h
index 954365d010..1f1c983eb3 100644
--- a/core/variant/callable.h
+++ b/core/variant/callable.h
@@ -45,6 +45,7 @@ class CallableCustom;
// but can be optimized or customized.
// Enforce 16 bytes with `alignas` to avoid arch-specific alignment issues on x86 vs armv7.
+
class Callable {
alignas(8) StringName method;
union {
@@ -68,10 +69,10 @@ public:
int expected = 0;
};
- void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, CallError &r_call_error) const;
- void call_deferred(const Variant **p_arguments, int p_argcount) const;
+ void callp(const Variant **p_arguments, int p_argcount, Variant &r_return_value, CallError &r_call_error) const;
+ void call_deferredp(const Variant **p_arguments, int p_argcount) const;
- Error rpc(int p_id, const Variant **p_arguments, int p_argcount, CallError &r_call_error) const;
+ Error rpcp(int p_id, const Variant **p_arguments, int p_argcount, CallError &r_call_error) const;
_FORCE_INLINE_ bool is_null() const {
return method == StringName() && object == 0;
@@ -84,7 +85,10 @@ public:
}
bool is_valid() const;
- Callable bind(const Variant **p_arguments, int p_argcount) const;
+ template <typename... VarArgs>
+ Callable bind(VarArgs... p_args);
+
+ Callable bindp(const Variant **p_arguments, int p_argcount) const;
Callable unbind(int p_argcount) const;
Object *get_object() const;