mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 20:22:55 +08:00
Use Array.Empty.
This commit is contained in:
parent
c5aebf6401
commit
87c8278139
@ -49,7 +49,7 @@ namespace osu.Game.IO.Legacy
|
|||||||
int len = ReadInt32();
|
int len = ReadInt32();
|
||||||
if (len > 0) return ReadBytes(len);
|
if (len > 0) return ReadBytes(len);
|
||||||
if (len < 0) return null;
|
if (len < 0) return null;
|
||||||
return new byte[0];
|
return Array.Empty<byte>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> Reads a char array from the buffer, handling nulls and the array length. </summary>
|
/// <summary> Reads a char array from the buffer, handling nulls and the array length. </summary>
|
||||||
@ -58,7 +58,7 @@ namespace osu.Game.IO.Legacy
|
|||||||
int len = ReadInt32();
|
int len = ReadInt32();
|
||||||
if (len > 0) return ReadChars(len);
|
if (len > 0) return ReadChars(len);
|
||||||
if (len < 0) return null;
|
if (len < 0) return null;
|
||||||
return new char[0];
|
return Array.Empty<char>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> Reads a DateTime from the buffer. </summary>
|
/// <summary> Reads a DateTime from the buffer. </summary>
|
||||||
|
@ -127,7 +127,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
if (mod == null)
|
if (mod == null)
|
||||||
{
|
{
|
||||||
Mods = new Mod[0];
|
Mods = Array.Empty<Mod>();
|
||||||
Alpha = 0;
|
Alpha = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user