1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 21:43:04 +08:00

Make BarsInfo a readonly struct

This commit is contained in:
Andrei Zavatski 2022-11-20 02:28:07 +03:00
parent fbfcf49ea6
commit fcb52ee237

View File

@ -42,7 +42,7 @@ namespace osu.Game.Graphics.UserInterface
}
}
private readonly BarsInfo bars = new BarsInfo(0);
private BarsInfo bars = new BarsInfo(0);
private float barBreadth;
@ -201,11 +201,11 @@ namespace osu.Game.Graphics.UserInterface
}
}
private struct BarsInfo
private readonly struct BarsInfo
{
private List<float> initialLengths;
private List<float> finalLengths;
private List<float> instantaneousLengths;
private readonly List<float> initialLengths;
private readonly List<float> finalLengths;
private readonly List<float> instantaneousLengths;
public bool Any => initialLengths.Any();