mirror of
https://github.com/ppy/osu
synced 2024-12-14 19:06:07 +00:00
Removed unnecessary copy (pass-by-reference anyways)
This commit is contained in:
parent
f3f3d1d0fc
commit
bd11124e6d
@ -134,14 +134,13 @@ namespace osu.Game.Online.Chat
|
|||||||
public static Message FormatMessage(Message inputMessage)
|
public static Message FormatMessage(Message inputMessage)
|
||||||
{
|
{
|
||||||
var result = format(inputMessage.Content);
|
var result = format(inputMessage.Content);
|
||||||
var formatted = inputMessage;
|
|
||||||
|
|
||||||
formatted.Content = result.Text;
|
inputMessage.Content = result.Text;
|
||||||
|
|
||||||
// Sometimes, regex matches are not in order
|
// Sometimes, regex matches are not in order
|
||||||
result.Links.Sort();
|
result.Links.Sort();
|
||||||
formatted.Links = result.Links;
|
inputMessage.Links = result.Links;
|
||||||
return formatted;
|
return inputMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MessageFormatterResult
|
public class MessageFormatterResult
|
||||||
|
Loading…
Reference in New Issue
Block a user