Skip to content

Commit

Permalink
Copy to avoid double nest iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Ski committed Oct 16, 2024
1 parent d22f403 commit 9b22223
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,12 @@ public void makeGizmosFor (GameObjectContainer gameObjectContainer, GameObject g
ObjectMap<Class<? extends Gizmo>, Gizmo> gameObjectGizmoMap = new ObjectMap<>();

Iterable<AComponent> components = gameObject.getComponents();
ObjectSet<AComponent> copy = new ObjectSet<>();
for (AComponent component : components) {
copy.add(component);
}

for (AComponent component : copy) {
Array<Gizmo> gizmos = GizmoRegister.makeGizmosFor(component);


Expand Down

0 comments on commit 9b22223

Please sign in to comment.