mirror of
https://github.com/godotengine/godot.git
synced 2025-10-24 02:13:36 +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
|
|
@ -510,7 +510,7 @@ void ExtendGDScriptParser::parse_function_symbol(const GDScriptParser::FunctionN
|
|||
node_stack.push_back(p_func->body);
|
||||
|
||||
while (!node_stack.is_empty()) {
|
||||
GDScriptParser::Node *node = node_stack[0];
|
||||
GDScriptParser::Node *node = node_stack.front()->get();
|
||||
node_stack.pop_front();
|
||||
|
||||
switch (node->type) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue