You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user