Merge pull request #10862 from neikeq/fix-defvals-methodinfo
Fixes reversed order of default arguments in MethodInfo
This commit is contained in:
commit
6209b72b07
1 changed files with 7 additions and 1 deletions
|
@ -535,7 +535,13 @@ void ClassDB::get_method_list(StringName p_class, List<MethodInfo> *p_methods, b
|
|||
|
||||
minfo.return_val = method->get_return_info();
|
||||
minfo.flags = method->get_hint_flags();
|
||||
minfo.default_arguments = method->get_default_arguments();
|
||||
|
||||
int defval_count = method->get_default_argument_count();
|
||||
minfo.default_arguments.resize(defval_count);
|
||||
|
||||
for (int i = 0; i < defval_count; i++) {
|
||||
minfo.default_arguments[i] = method->get_default_argument(defval_count - i - 1);
|
||||
}
|
||||
|
||||
p_methods->push_back(minfo);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue