Skip to content

Commit

Permalink
Remove no-longer-necessary guard
Browse files Browse the repository at this point in the history
  • Loading branch information
bdach committed May 11, 2022
1 parent 2266a5c commit 9353916
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions osu.Game/Overlays/Mods/ModSelectOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events;
using osu.Framework.Lists;
using osu.Framework.Utils;
using osu.Game.Audio;
using osu.Game.Configuration;
Expand Down Expand Up @@ -407,11 +406,6 @@ private void updateFromInternalSelection()
.Select(modState => modState.Mod)
.ToArray();

// the following guard intends to check cases where we've already replaced potentially-external mod references with our own and avoid endless recursion.
// TODO: replace custom comparer with System.Collections.Generic.ReferenceEqualityComparer when fully on .NET 6
if (candidateSelection.SequenceEqual(SelectedMods.Value, new FuncEqualityComparer<Mod>(ReferenceEquals)))
return;

SelectedMods.Value = ComputeNewModsFromSelection(SelectedMods.Value, candidateSelection);
}

Expand Down

0 comments on commit 9353916

Please sign in to comment.