diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-04-12 22:22:44 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-04-12 22:22:44 -0300 |
commit | 8fa4f1cf8288c62b52d84d094ec88b0e8f3791b1 (patch) | |
tree | c0424362352e98dc4b44a1f4fe532500bc4ad79a | |
parent | ed5b93907720375e854ee67ae741145ab77e4d71 (diff) | |
download | redot-engine-8fa4f1cf8288c62b52d84d094ec88b0e8f3791b1.tar.gz |
-Made sure that "free" function appears in documentation and code completion, fixes #1664
-rw-r--r-- | core/object.cpp | 2 | ||||
-rw-r--r-- | core/object_type_db.cpp | 5 | ||||
-rw-r--r-- | core/object_type_db.h | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/core/object.cpp b/core/object.cpp index f71521a0ff..46f536520d 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -1505,6 +1505,8 @@ void Object::_bind_methods() { ObjectTypeDB::bind_method(_MD("is_queued_for_deletion"),&Object::is_queued_for_deletion); + ObjectTypeDB::add_virtual_method("Object",MethodInfo("free"),false); + ADD_SIGNAL( MethodInfo("script_changed")); BIND_VMETHOD( MethodInfo("_notification",PropertyInfo(Variant::INT,"what")) ); diff --git a/core/object_type_db.cpp b/core/object_type_db.cpp index 1047d7eba5..8184deed73 100644 --- a/core/object_type_db.cpp +++ b/core/object_type_db.cpp @@ -804,12 +804,13 @@ else goto set_defvals; } -void ObjectTypeDB::add_virtual_method(const StringName& p_type,const MethodInfo& p_method ) { +void ObjectTypeDB::add_virtual_method(const StringName& p_type, const MethodInfo& p_method , bool p_virtual) { ERR_FAIL_COND(!types.has(p_type)); #ifdef DEBUG_METHODS_ENABLED MethodInfo mi=p_method; - mi.flags|=METHOD_FLAG_VIRTUAL; + if (p_virtual) + mi.flags|=METHOD_FLAG_VIRTUAL; types[p_type].virtual_methods.push_back(mi); #endif diff --git a/core/object_type_db.h b/core/object_type_db.h index 617a0a7c20..2318515d03 100644 --- a/core/object_type_db.h +++ b/core/object_type_db.h @@ -468,7 +468,7 @@ public: static void get_method_list(StringName p_type,List<MethodInfo> *p_methods,bool p_no_inheritance=false); static MethodBind *get_method(StringName p_type, StringName p_name); - static void add_virtual_method(const StringName& p_type,const MethodInfo& p_method ); + static void add_virtual_method(const StringName& p_type,const MethodInfo& p_method,bool p_virtual=true ); static void get_virtual_methods(const StringName& p_type,List<MethodInfo> * p_methods,bool p_no_inheritance=false ); static void bind_integer_constant(const StringName& p_type, const StringName &p_name, int p_constant); |