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

@ -118,8 +118,7 @@ namespace osu.Game.Overlays
notification.Closed += notificationClosed;
var hasCompletionTarget = notification as IHasCompletionTarget;
if (hasCompletionTarget != null)
if (notification is IHasCompletionTarget hasCompletionTarget)
hasCompletionTarget.CompletionTarget = Post;
var ourType = notification.GetType();