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

Simplify file reading.

This commit is contained in:
Dean Herbert 2017-03-03 20:24:34 +09:00
parent 4a109fcc55
commit 1ea1118db6
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

View File

@ -300,10 +300,9 @@ namespace osu.Game.Screens.Tournament
using (Stream stream = storage.GetStream(results_filename, FileAccess.Read, FileMode.Open))
using (StreamReader sr = new StreamReader(stream))
{
while (sr.Peek() != -1)
string line;
while ((line = sr.ReadLine()?.Trim()) != null)
{
string line = sr.ReadLine().Trim();
if (string.IsNullOrEmpty(line))
continue;