mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03: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:
@@ -3231,7 +3231,7 @@ void Node::print_orphan_nodes() {
|
||||
ObjectDB::debug_objects(_print_orphan_nodes_routine);
|
||||
|
||||
for (const KeyValue<ObjectID, List<String>> &E : _print_orphan_nodes_map) {
|
||||
print_line(itos(E.key) + " - Stray Node: " + E.value[0] + " (Type: " + E.value[1] + ")");
|
||||
print_line(itos(E.key) + " - Stray Node: " + E.value.get(0) + " (Type: " + E.value.get(1) + ")");
|
||||
}
|
||||
|
||||
// Flush it after use.
|
||||
|
||||
Reference in New Issue
Block a user