Initialise `Simple{Triple,Quadruple}` only once ever rather than create every time

This commit is contained in:
Bartłomiej Dach 2022-01-23 15:14:53 +01:00
parent e4758c9dbb
commit 4e5a1f27a8
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
1 changed files with 2 additions and 2 deletions

View File

@ -27,8 +27,8 @@ public TimeSignature(int numerator)
Numerator = numerator;
}
public static TimeSignature SimpleTriple => new TimeSignature(3);
public static TimeSignature SimpleQuadruple => new TimeSignature(4);
public static TimeSignature SimpleTriple { get; } = new TimeSignature(3);
public static TimeSignature SimpleQuadruple { get; } = new TimeSignature(4);
public override string ToString() => $"{Numerator}/4";