mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 00:09:55 +09:00
Use static instances in all fallback ControlPoint lookups to reduce allocations
This commit is contained in:
@ -13,6 +13,18 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
/// </summary>
|
||||
public readonly Bindable<TimeSignatures> TimeSignatureBindable = new Bindable<TimeSignatures>(TimeSignatures.SimpleQuadruple) { Default = TimeSignatures.SimpleQuadruple };
|
||||
|
||||
/// <summary>
|
||||
/// Default length of a beat in milliseconds. Used whenever there is no beatmap or track playing.
|
||||
/// </summary>
|
||||
private const double default_beat_length = 60000.0 / 60.0;
|
||||
|
||||
public static readonly TimingControlPoint DEFAULT = new TimingControlPoint
|
||||
{
|
||||
BeatLength = default_beat_length,
|
||||
BeatLengthBindable = { Disabled = true },
|
||||
TimeSignatureBindable = { Disabled = true }
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The time signature at this control point.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user