From 7d1c270126a60b075504ca4ae4769e03fc94cee3 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 21 Aug 2017 23:34:08 +0900 Subject: [PATCH] Review fixes --- osu.Game/Online/Chat/Channel.cs | 2 +- osu.Game/Online/Chat/Message.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game/Online/Chat/Channel.cs b/osu.Game/Online/Chat/Channel.cs index 2878856159..81d488353a 100644 --- a/osu.Game/Online/Chat/Channel.cs +++ b/osu.Game/Online/Chat/Channel.cs @@ -79,7 +79,7 @@ namespace osu.Game.Online.Chat public void ReplaceMessage(LocalEchoMessage echo, Message final) { if (!pendingMessages.Remove(echo)) - Trace.Fail("Attempted to remove echo that wasn't present"); + throw new InvalidOperationException("Attempted to remove echo that wasn't present"); Messages.Remove(echo); diff --git a/osu.Game/Online/Chat/Message.cs b/osu.Game/Online/Chat/Message.cs index fc61b9f37a..509861868a 100644 --- a/osu.Game/Online/Chat/Message.cs +++ b/osu.Game/Online/Chat/Message.cs @@ -44,7 +44,6 @@ namespace osu.Game.Online.Chat public int CompareTo(Message other) { - if (!Id.HasValue) return other.Id.HasValue ? 1 : Timestamp.CompareTo(other.Timestamp); if (!other.Id.HasValue)