1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 21:12:55 +08:00

Use for instead of foreach to avoid enumerator overhead

This commit is contained in:
Dean Herbert 2022-01-20 22:21:00 +09:00
parent 0b93f3c88f
commit 80f3a67876

View File

@ -225,8 +225,9 @@ namespace osu.Game.Screens.Select
// Since then, there may have been imports or deletions. // Since then, there may have been imports or deletions.
// Here we manually catch up on any changes. // Here we manually catch up on any changes.
var realmSets = new HashSet<Guid>(); var realmSets = new HashSet<Guid>();
foreach (var s in sender)
realmSets.Add(s.ID); for (int i = 0; i < sender.Count; i++)
realmSets.Add(sender[i].ID);
foreach (var id in realmSets) foreach (var id in realmSets)
{ {