1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-26 06:49:54 +08:00

Avoid extra MemoryStream in ArchiveReader.

This commit is contained in:
Huo Yaoyuan
2017-05-08 19:41:22 +08:00
Unverified
parent ced2332d20
commit 01616cc27c
+3 -5
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;
}
}
}