1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:07:23 +08:00

Avoid usage of finally in potentially hot path

This commit is contained in:
Dean Herbert 2022-07-06 19:55:43 +09:00
parent 01bc6e5cb7
commit c2f1069073

View File

@ -34,14 +34,10 @@ namespace osu.Game.IO
/// </summary>
public string? ReadLine()
{
try
{
return peekedLine ?? streamReader.ReadLine();
}
finally
{
peekedLine = null;
}
string? line = peekedLine ?? streamReader.ReadLine();
peekedLine = null;
return line;
}
/// <summary>