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