mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 15:22:55 +08:00
Invert if to reduce nesting
This commit is contained in:
parent
719da48922
commit
ca68d94cf7
@ -226,8 +226,9 @@ namespace osu.Game.Tournament.Screens
|
||||
|
||||
base.Action = () =>
|
||||
{
|
||||
if (numberBox.Text.Length > 0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(numberBox.Text))
|
||||
return;
|
||||
|
||||
// box contains text
|
||||
if (!int.TryParse(numberBox.Text, out var number))
|
||||
{
|
||||
@ -244,7 +245,6 @@ namespace osu.Game.Tournament.Screens
|
||||
numberBox.Text = number.ToString();
|
||||
|
||||
Action?.Invoke(number);
|
||||
}
|
||||
};
|
||||
return drawable;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user