summaryrefslogtreecommitdiff
path: root/core/method_bind.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-20 11:30:56 +0100
committerGitHub <noreply@github.com>2020-02-20 11:30:56 +0100
commitbd61281a5f515065b05be008dd3d6b73a03f5a7c (patch)
tree0add52fc270f808b4b2ad0bf7c970d72338c667e /core/method_bind.h
parent1a4be2cd8fdd9ba26f016f3e2d83febfe8ae141c (diff)
parent69c95f4b4c128a22777af1e155bc24c7033decca (diff)
Merge pull request #36368 from reduz/variant-rework
Reworked signal system, added support for Callable and Signal
Diffstat (limited to 'core/method_bind.h')
-rw-r--r--core/method_bind.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/method_bind.h b/core/method_bind.h
index 1860d227f7..72be141fd3 100644
--- a/core/method_bind.h
+++ b/core/method_bind.h
@@ -155,7 +155,7 @@ struct VariantObjectClassChecker<Control *> {
Variant::Type argtype = get_argument_type(m_arg - 1); \
if (!Variant::can_convert_strict(p_args[m_arg - 1]->get_type(), argtype) || \
!VariantObjectClassChecker<P##m_arg>::check(*p_args[m_arg - 1])) { \
- r_error.error = Variant::CallError::CALL_ERROR_INVALID_ARGUMENT; \
+ r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; \
r_error.argument = m_arg - 1; \
r_error.expected = argtype; \
return Variant(); \
@@ -278,7 +278,7 @@ public:
_FORCE_INLINE_ int get_argument_count() const { return argument_count; };
- virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Variant::CallError &r_error) = 0;
+ virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) = 0;
#ifdef PTRCALL_ENABLED
virtual void ptrcall(Object *p_object, const void **p_args, void *r_ret) = 0;
@@ -300,7 +300,7 @@ public:
template <class T>
class MethodBindVarArg : public MethodBind {
public:
- typedef Variant (T::*NativeCall)(const Variant **, int, Variant::CallError &);
+ typedef Variant (T::*NativeCall)(const Variant **, int, Callable::CallError &);
protected:
NativeCall call_method;
@@ -338,7 +338,7 @@ public:
}
#endif
- virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Variant::CallError &r_error) {
+ virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) {
T *instance = static_cast<T *>(p_object);
return (instance->*call_method)(p_args, p_arg_count, r_error);
@@ -389,7 +389,7 @@ public:
};
template <class T>
-MethodBind *create_vararg_method_bind(Variant (T::*p_method)(const Variant **, int, Variant::CallError &), const MethodInfo &p_info, bool p_return_nil_is_variant) {
+MethodBind *create_vararg_method_bind(Variant (T::*p_method)(const Variant **, int, Callable::CallError &), const MethodInfo &p_info, bool p_return_nil_is_variant) {
MethodBindVarArg<T> *a = memnew((MethodBindVarArg<T>));
a->set_method(p_method);