mirror of https://github.com/ppy/osu
Avoid usage of `finally` in potentially hot path
This commit is contained in:
parent
01bc6e5cb7
commit
c2f1069073
|
@ -34,14 +34,10 @@ public LineBufferedReader(Stream stream, bool leaveOpen = false)
|
|||
/// </summary>
|
||||
public string? ReadLine()
|
||||
{
|
||||
try
|
||||
{
|
||||
return peekedLine ?? streamReader.ReadLine();
|
||||
}
|
||||
finally
|
||||
{
|
||||
peekedLine = null;
|
||||
}
|
||||
string? line = peekedLine ?? streamReader.ReadLine();
|
||||
|
||||
peekedLine = null;
|
||||
return line;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue