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>
|
/// </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>
|
||||||
|
|
Loading…
Reference in New Issue