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

@ -84,7 +84,7 @@ namespace osu.Game.Graphics
public override bool Invalidate(Invalidation invalidation = Invalidation.All, Drawable source = null, bool shallPropagate = true)
{
if ((invalidation & Invalidation.Colour) > 0 && Shadow)
if (invalidation.HasFlag(Invalidation.Colour) && Shadow)
layout.Invalidate();
return base.Invalidate(invalidation, source, shallPropagate);
}