mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 17:47:29 +08:00
Remove IsLayered
from LegacyHitSampleInfo
comparison
The equality of samples is generally used to compare the sample equality, not its full properties. For instance, we don't compare `Volume` in the base implementation. Having `IsLayered` here breaks actual usages of equality, ie. for pooling purposes.
This commit is contained in:
parent
6d6f73e016
commit
4523393208
@ -500,7 +500,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
=> new LegacyHitSampleInfo(newName.GetOr(Name), newBank.GetOr(Bank), newVolume.GetOr(Volume), newCustomSampleBank.GetOr(CustomSampleBank), newIsLayered.GetOr(IsLayered));
|
||||
|
||||
public bool Equals(LegacyHitSampleInfo? other)
|
||||
=> base.Equals(other) && CustomSampleBank == other.CustomSampleBank && IsLayered == other.IsLayered;
|
||||
=> base.Equals(other) && CustomSampleBank == other.CustomSampleBank;
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
=> obj is LegacyHitSampleInfo other && Equals(other);
|
||||
|
Loading…
Reference in New Issue
Block a user