1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

[Core] Use Vector for MethodInfo::arguments

This commit is contained in:
A Thousand Ships
2024-05-07 12:48:51 +02:00
parent cae3d722a3
commit d9721954e6
18 changed files with 107 additions and 124 deletions

View File

@@ -115,10 +115,19 @@ TypedArray<Dictionary> convert_property_list(const List<PropertyInfo> *p_list) {
return va;
}
TypedArray<Dictionary> convert_property_list(const Vector<PropertyInfo> &p_vector) {
TypedArray<Dictionary> va;
for (const PropertyInfo &E : p_vector) {
va.push_back(Dictionary(E));
}
return va;
}
MethodInfo::operator Dictionary() const {
Dictionary d;
d["name"] = name;
d["args"] = convert_property_list(&arguments);
d["args"] = convert_property_list(arguments);
Array da;
for (int i = 0; i < default_arguments.size(); i++) {
da.push_back(default_arguments[i]);