1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 06:42:56 +08:00

Avoid extra MemoryStream in ArchiveReader.

This commit is contained in:
Huo Yaoyuan 2017-05-08 19:41:22 +08:00
parent ced2332d20
commit 01616cc27c

View File

@ -58,11 +58,9 @@ namespace osu.Game.Beatmaps.IO
if (input == null)
return null;
using (MemoryStream ms = new MemoryStream())
{
input.CopyTo(ms);
return ms.ToArray();
}
byte[] buffer = new byte[input.Length];
input.Read(buffer, 0, buffer.Length);
return buffer;
}
}
}