You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +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:
@@ -967,7 +967,7 @@ void DebugAdapterProtocol::on_debug_stack_frame_var(const Array &p_data) {
|
||||
List<int> scope_ids = stackframe_list.find(frame)->value;
|
||||
ERR_FAIL_COND(scope_ids.size() != 3);
|
||||
ERR_FAIL_INDEX(stack_var.type, 3);
|
||||
int var_id = scope_ids[stack_var.type];
|
||||
int var_id = scope_ids.get(stack_var.type);
|
||||
|
||||
DAP::Variable variable;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user