mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 21:52:55 +08:00
chore: correct equal logic
This commit is contained in:
parent
0a6960296e
commit
e1c1609271
@ -126,7 +126,13 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
public T[]? Values;
|
||||
|
||||
public bool Equals(OptionalArray<T> other) => Values?.SequenceEqual(other.Values ?? Array.Empty<T>()) ?? false;
|
||||
public bool Equals(OptionalArray<T> other)
|
||||
{
|
||||
if (Values is null && other.Values is null)
|
||||
return true;
|
||||
|
||||
return Values?.SequenceEqual(other.Values ?? Array.Empty<T>()) ?? false;
|
||||
}
|
||||
}
|
||||
|
||||
public struct OptionalRange<T> : IEquatable<OptionalRange<T>>
|
||||
|
Loading…
Reference in New Issue
Block a user