From bd11124e6dcaacec6d035a089573e5934647a599 Mon Sep 17 00:00:00 2001 From: FreezyLemon Date: Thu, 7 Dec 2017 11:12:12 +0100 Subject: [PATCH] Removed unnecessary copy (pass-by-reference anyways) --- osu.Game/Online/Chat/MessageFormatter.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/osu.Game/Online/Chat/MessageFormatter.cs b/osu.Game/Online/Chat/MessageFormatter.cs index 5853d50c1f..43bfa36fed 100644 --- a/osu.Game/Online/Chat/MessageFormatter.cs +++ b/osu.Game/Online/Chat/MessageFormatter.cs @@ -134,14 +134,13 @@ namespace osu.Game.Online.Chat public static Message FormatMessage(Message inputMessage) { var result = format(inputMessage.Content); - var formatted = inputMessage; - formatted.Content = result.Text; + inputMessage.Content = result.Text; // Sometimes, regex matches are not in order result.Links.Sort(); - formatted.Links = result.Links; - return formatted; + inputMessage.Links = result.Links; + return inputMessage; } public class MessageFormatterResult