Use Enum.HasFlag

With .NET core 2.0+ this is as efficient as the ugly code we've been using.
This commit is contained in:
Dean Herbert
2018-07-16 16:17:22 +09:00
parent bb7d0715b1
commit dbc538abbe
13 changed files with 55 additions and 54 deletions

View File

@ -306,8 +306,8 @@ namespace osu.Game.Beatmaps.Formats
if (split.Length >= 8)
{
int effectFlags = int.Parse(split[7]);
kiaiMode = (effectFlags & 1) > 0;
omitFirstBarSignature = (effectFlags & 8) > 0;
kiaiMode = effectFlags.HasFlag(1);
omitFirstBarSignature = effectFlags.HasFlag(8);
}
string stringSampleSet = sampleSet.ToString().ToLower();