1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:02:55 +08:00

Small refactoring to use .Trim() instead

This commit is contained in:
smoogipoo 2021-02-09 12:00:03 +09:00
parent 414e05affd
commit 3ce605b5e5

View File

@ -151,11 +151,10 @@ namespace osu.Game.Screens.Edit.Timing
return new RowAttribute("difficulty", () => $"{difficulty.SpeedMultiplier:n2}x", colour); return new RowAttribute("difficulty", () => $"{difficulty.SpeedMultiplier:n2}x", colour);
case EffectControlPoint effect: case EffectControlPoint effect:
return new RowAttribute("effect", () => string.Join(" ", new[] return new RowAttribute("effect", () => string.Join(" ",
{
effect.KiaiMode ? "Kiai" : string.Empty, effect.KiaiMode ? "Kiai" : string.Empty,
effect.OmitFirstBarLine ? "NoBarLine" : string.Empty effect.OmitFirstBarLine ? "NoBarLine" : string.Empty
}.Where(s => !string.IsNullOrEmpty(s))), colour); ).Trim(), colour);
case SampleControlPoint sample: case SampleControlPoint sample:
return new RowAttribute("sample", () => $"{sample.SampleBank} {sample.SampleVolume}%", colour); return new RowAttribute("sample", () => $"{sample.SampleBank} {sample.SampleVolume}%", colour);