1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 19:03:08 +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(); peekedLine = null;
} return line;
finally
{
peekedLine = null;
}
} }
/// <summary> /// <summary>