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:
parent
ced2332d20
commit
01616cc27c
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user