mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Migrate decoding to line-buffered reader
Migrate all usages of StreamReader in the context of decoding beatmaps, storyboards or skins to the new LineBufferedReader.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System.IO;
|
||||
using osu.Game.IO;
|
||||
using osu.Game.IO.Serialization;
|
||||
|
||||
namespace osu.Game.Beatmaps.Formats
|
||||
@ -13,11 +13,8 @@ namespace osu.Game.Beatmaps.Formats
|
||||
AddDecoder<Beatmap>("{", m => new JsonBeatmapDecoder());
|
||||
}
|
||||
|
||||
protected override void ParseStreamInto(StreamReader stream, Beatmap output)
|
||||
protected override void ParseStreamInto(LineBufferedReader stream, Beatmap output)
|
||||
{
|
||||
stream.BaseStream.Position = 0;
|
||||
stream.DiscardBufferedData();
|
||||
|
||||
stream.ReadToEnd().DeserializeInto(output);
|
||||
|
||||
foreach (var hitObject in output.HitObjects)
|
||||
|
Reference in New Issue
Block a user