mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 18:54:43 +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
|
|
@ -760,7 +760,7 @@ Variant::Type GDScriptUtilityFunctions::get_function_argument_type(const StringN
|
|||
GDScriptUtilityFunctionInfo *info = utility_function_table.lookup_ptr(p_function);
|
||||
ERR_FAIL_NULL_V(info, Variant::NIL);
|
||||
ERR_FAIL_COND_V(p_arg >= info->info.arguments.size(), Variant::NIL);
|
||||
return info->info.arguments[p_arg].type;
|
||||
return info->info.arguments.get(p_arg).type;
|
||||
}
|
||||
|
||||
int GDScriptUtilityFunctions::get_function_argument_count(const StringName &p_function) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue