mirror of
https://github.com/ppy/osu
synced 2025-03-04 10:29:37 +00:00
Replace try-finally with return
Try-finally has a small overhead that's unnecessary in this case given how small the code block is.
This commit is contained in:
parent
419d5a76ce
commit
20b890570e
@ -174,14 +174,9 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
|
||||
public bool OnPressed(KeyBindingPressEvent<OsuAction> e)
|
||||
{
|
||||
try
|
||||
{
|
||||
return BlockNextPress;
|
||||
}
|
||||
finally
|
||||
{
|
||||
BlockNextPress = false;
|
||||
}
|
||||
bool block = BlockNextPress;
|
||||
BlockNextPress = false;
|
||||
return block;
|
||||
}
|
||||
|
||||
public void OnReleased(KeyBindingReleaseEvent<OsuAction> e)
|
||||
|
Loading…
Reference in New Issue
Block a user