Skip to content

Commit

Permalink
Engine - ECS: cleanup ChildEntities.ToArray()
Browse files Browse the repository at this point in the history
  • Loading branch information
friflo committed Jul 19, 2024
1 parent 44ae5b1 commit 84ee7f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Engine/src/ECS/Entity/ChildEntities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ public void ToArray(Entity[] array) {
}

internal Entity[] ToArray() {
var ids = Ids;
var array = new Entity[Ids.Length];
for (int n = 0; n < Ids.Length; n++) {
var ids = Ids;
var array = new Entity[ids.Length];
for (int n = 0; n < ids.Length; n++) {
array[n] = new Entity(store, ids[n]);
}
return array;
Expand Down

0 comments on commit 84ee7f7

Please sign in to comment.