mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Reduce and prevent unnecessary random-access to List
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when accessing a single element) * Removed subscript operator, in favor of a more explicit `get` * Added conversion from `Iterator` to `ConstIterator` * Remade existing operations into other solutions when applicable
This commit is contained in:
parent
7ebc866418
commit
955d5affa8
103 changed files with 877 additions and 849 deletions
|
|
@ -166,10 +166,10 @@ void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) {
|
|||
|
||||
Array arguments;
|
||||
signal_dict["arguments"] = arguments;
|
||||
for (int i = 0; i < mi.arguments.size(); i++) {
|
||||
for (const PropertyInfo &pi : mi.arguments) {
|
||||
Dictionary argument_dict;
|
||||
arguments.push_back(argument_dict);
|
||||
argument_dict["type"] = mi.arguments[i].type;
|
||||
argument_dict["type"] = pi.type;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue