1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 19:32:55 +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> /// </summary>
public string? ReadLine() public string? ReadLine()
{ {
try string? line = peekedLine ?? streamReader.ReadLine();
{
return peekedLine ?? streamReader.ReadLine();
}
finally
{
peekedLine = null; peekedLine = null;
} return line;
} }
/// <summary> /// <summary>