mirror of https://github.com/ppy/osu
Consider mod equality in difficulty cache lookup rather than acronym
This commit is contained in:
parent
060ba0692d
commit
0291cd5ae2
|
@ -297,7 +297,7 @@ public DifficultyCacheLookup([NotNull] BeatmapInfo beatmap, [CanBeNull] RulesetI
|
||||||
public bool Equals(DifficultyCacheLookup other)
|
public bool Equals(DifficultyCacheLookup other)
|
||||||
=> Beatmap.ID == other.Beatmap.ID
|
=> Beatmap.ID == other.Beatmap.ID
|
||||||
&& Ruleset.ID == other.Ruleset.ID
|
&& Ruleset.ID == other.Ruleset.ID
|
||||||
&& OrderedMods.Select(m => m.Acronym).SequenceEqual(other.OrderedMods.Select(m => m.Acronym));
|
&& OrderedMods.SequenceEqual(other.OrderedMods);
|
||||||
|
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
{
|
{
|
||||||
|
@ -307,7 +307,7 @@ public override int GetHashCode()
|
||||||
hashCode.Add(Ruleset.ID);
|
hashCode.Add(Ruleset.ID);
|
||||||
|
|
||||||
foreach (var mod in OrderedMods)
|
foreach (var mod in OrderedMods)
|
||||||
hashCode.Add(mod.Acronym);
|
hashCode.Add(mod);
|
||||||
|
|
||||||
return hashCode.ToHashCode();
|
return hashCode.ToHashCode();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue