mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Avoid empty list allocation
This commit is contained in:
@ -102,10 +102,13 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
// to avoid allocation
|
||||||
|
private readonly List<IInput> emptyInputList = new List<IInput>();
|
||||||
|
|
||||||
protected override List<IInput> GetPendingInputs()
|
protected override List<IInput> GetPendingInputs()
|
||||||
{
|
{
|
||||||
if (replayInputHandler != null && !replayInputHandler.IsActive)
|
if (replayInputHandler != null && !replayInputHandler.IsActive)
|
||||||
return new List<IInput>();
|
return emptyInputList;
|
||||||
|
|
||||||
return base.GetPendingInputs();
|
return base.GetPendingInputs();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user