Skip to content

Commit

Permalink
remove unnecessary tolist()
Browse files Browse the repository at this point in the history
  • Loading branch information
XtraCube committed Dec 27, 2024
1 parent 69635e0 commit e2b8c0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MiraAPI/Utilities/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static ContactFilter2D CreateFilter(int layerMask)
/// <returns>The ship room if its found.</returns>
public static PlainShipRoom? GetRoom(Vector3 pos)
{
return ShipStatus.Instance.AllRooms.ToList().Find(room => room.roomArea.OverlapPoint(pos));
return ShipStatus.Instance.AllRooms.FirstOrDefault(room => room.roomArea.OverlapPoint(pos));
}

/// <summary>
Expand Down

0 comments on commit e2b8c0c

Please sign in to comment.