mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 18:23:04 +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 = () =>
|
base.Action = () =>
|
||||||
{
|
{
|
||||||
if (numberBox.Text.Length > 0)
|
if (string.IsNullOrEmpty(numberBox.Text))
|
||||||
{
|
return;
|
||||||
|
|
||||||
// box contains text
|
// box contains text
|
||||||
if (!int.TryParse(numberBox.Text, out var number))
|
if (!int.TryParse(numberBox.Text, out var number))
|
||||||
{
|
{
|
||||||
@ -244,7 +245,6 @@ namespace osu.Game.Tournament.Screens
|
|||||||
numberBox.Text = number.ToString();
|
numberBox.Text = number.ToString();
|
||||||
|
|
||||||
Action?.Invoke(number);
|
Action?.Invoke(number);
|
||||||
}
|
|
||||||
};
|
};
|
||||||
return drawable;
|
return drawable;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user