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:
@@ -852,7 +852,7 @@ void Skeleton3D::force_update_bone_children_transforms(int p_bone_idx) {
|
||||
bones_to_process.push_back(p_bone_idx);
|
||||
|
||||
while (bones_to_process.size() > 0) {
|
||||
int current_bone_idx = bones_to_process[0];
|
||||
int current_bone_idx = bones_to_process.front()->get();
|
||||
bones_to_process.erase(current_bone_idx);
|
||||
|
||||
Bone &b = bonesptr[current_bone_idx];
|
||||
|
||||
Reference in New Issue
Block a user