summaryrefslogtreecommitdiff
path: root/core/method_bind.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/method_bind.h')
-rw-r--r--core/method_bind.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/method_bind.h b/core/method_bind.h
index 30a848270d..3d62e38daa 100644
--- a/core/method_bind.h
+++ b/core/method_bind.h
@@ -154,6 +154,8 @@ VARIANT_ENUM_CAST( wchar_t );
VARIANT_ENUM_CAST( Margin );
VARIANT_ENUM_CAST( Orientation );
VARIANT_ENUM_CAST( HAlign );
+VARIANT_ENUM_CAST( Variant::Type );
+VARIANT_ENUM_CAST( Variant::Operator );
class MethodBind {
@@ -170,11 +172,13 @@ class MethodBind {
StringName ret_type;
#endif
bool _const;
+ bool _returns;
protected:
void _set_const(bool p_const);
+ void _set_returns(bool p_returns);
#ifdef DEBUG_METHODS_ENABLED
virtual Variant::Type _gen_argument_type(int p_arg) const=0;
void _generate_argument_types(int p_count);
@@ -261,6 +265,7 @@ public:
void set_name(const StringName& p_name);
_FORCE_INLINE_ int get_method_id() const { return method_id; }
_FORCE_INLINE_ bool is_const() const { return _const; }
+ _FORCE_INLINE_ bool has_return() const { return _returns; }
void set_default_arguments(const Vector<Variant>& p_defargs);
@@ -321,7 +326,7 @@ public:
virtual bool is_const() const { return false; }
virtual String get_instance_type() const { return T::get_type_static(); }
- MethodBindNative() { call_method=NULL; }
+ MethodBindNative() { call_method=NULL; _set_returns(true);}
};