Use pattern matching wherever possible

This commit is contained in:
Dean Herbert
2019-02-28 14:35:00 +09:00
parent 94a389319d
commit e2c6a8bc07
13 changed files with 17 additions and 29 deletions

View File

@ -64,8 +64,7 @@ namespace osu.Game.Graphics.UserInterface
set
{
accentColour = value;
var dropdown = Dropdown as IHasAccentColour;
if (dropdown != null)
if (Dropdown is IHasAccentColour dropdown)
dropdown.AccentColour = value;
foreach (var i in TabContainer.Children.OfType<IHasAccentColour>())
i.AccentColour = value;