From 762b4412e5ed98f1eacfd26b49540cea51a711b1 Mon Sep 17 00:00:00 2001 From: miterosan Date: Mon, 9 Apr 2018 22:29:48 +0200 Subject: [PATCH] Convert if to switch --- osu.Game/Overlays/ChatOverlay.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index bc6ec72e14..0935293058 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -247,16 +247,16 @@ namespace osu.Game.Overlays textbox.Current.Disabled = chat.ReadOnly; - if (chat is ChannelChat channelChat) + switch (chat) { - channelTabs.Current.Value = channelChat; - userTabs.DeselectAll(); - } - - if (chat is UserChat userChat) - { - userTabs.Current.Value = userChat; - channelTabs.DeselectAll(); + case ChannelChat channelChat: + channelTabs.Current.Value = channelChat; + userTabs.DeselectAll(); + break; + case UserChat userChat: + userTabs.Current.Value = userChat; + channelTabs.DeselectAll(); + break; } var loaded = loadedChannels.Find(d => d.Chat == chat);