mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Simplify file reading.
This commit is contained in:
@ -300,10 +300,9 @@ namespace osu.Game.Screens.Tournament
|
|||||||
using (Stream stream = storage.GetStream(results_filename, FileAccess.Read, FileMode.Open))
|
using (Stream stream = storage.GetStream(results_filename, FileAccess.Read, FileMode.Open))
|
||||||
using (StreamReader sr = new StreamReader(stream))
|
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))
|
if (string.IsNullOrEmpty(line))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user