From 87c8278139127acdba2fddc5e4416c8a33317d6e Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Sun, 24 Sep 2017 03:45:46 +0800 Subject: [PATCH] Use Array.Empty. --- osu.Game/IO/Legacy/SerializationReader.cs | 4 ++-- osu.Game/Overlays/Mods/ModButton.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/IO/Legacy/SerializationReader.cs b/osu.Game/IO/Legacy/SerializationReader.cs index bad143fa6c..c7ea884821 100644 --- a/osu.Game/IO/Legacy/SerializationReader.cs +++ b/osu.Game/IO/Legacy/SerializationReader.cs @@ -49,7 +49,7 @@ namespace osu.Game.IO.Legacy int len = ReadInt32(); if (len > 0) return ReadBytes(len); if (len < 0) return null; - return new byte[0]; + return Array.Empty(); } /// Reads a char array from the buffer, handling nulls and the array length. @@ -58,7 +58,7 @@ namespace osu.Game.IO.Legacy int len = ReadInt32(); if (len > 0) return ReadChars(len); if (len < 0) return null; - return new char[0]; + return Array.Empty(); } /// Reads a DateTime from the buffer. diff --git a/osu.Game/Overlays/Mods/ModButton.cs b/osu.Game/Overlays/Mods/ModButton.cs index 3ca4a204a5..6bfe70d873 100644 --- a/osu.Game/Overlays/Mods/ModButton.cs +++ b/osu.Game/Overlays/Mods/ModButton.cs @@ -127,7 +127,7 @@ namespace osu.Game.Overlays.Mods if (mod == null) { - Mods = new Mod[0]; + Mods = Array.Empty(); Alpha = 0; } else