summaryrefslogtreecommitdiff
path: root/core/class_db.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-08-23 19:10:32 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-08-23 19:11:11 -0300
commit3d1c03187132677800b7f6bc609eeef8fe51f315 (patch)
treed92a3bf3730e4a443858ce9dd96ee4268693ee7a /core/class_db.cpp
parent21d53f29f392f4a33095de75c478da345a362555 (diff)
Changed MethodBind API to request information from methods. It's much claner now.
Also changed PropertyInfo to include informatino about class names.
Diffstat (limited to 'core/class_db.cpp')
-rw-r--r--core/class_db.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/class_db.cpp b/core/class_db.cpp
index 6cd7586a54..ff31ea7b06 100644
--- a/core/class_db.cpp
+++ b/core/class_db.cpp
@@ -538,9 +538,7 @@ void ClassDB::get_method_list(StringName p_class, List<MethodInfo> *p_methods, b
minfo.arguments.push_back(method->get_argument_info(i));
}
- if (method->get_argument_type(-1) != Variant::NIL) {
- minfo.return_val = method->get_argument_info(-1);
- }
+ minfo.return_val = method->get_return_info();
minfo.flags = method->get_hint_flags();
p_methods->push_back(minfo);
@@ -680,7 +678,7 @@ StringName ClassDB::get_integer_constant_enum(const StringName &p_class, const S
List<StringName> &constants_list = type->enum_map.get(*k);
const List<StringName>::Element *found = constants_list.find(p_name);
if (found)
- return found->get();
+ return *k;
}
if (p_no_inheritance)