1
0
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:
Bartłomiej Dach 2020-05-25 20:18:17 +02:00
parent 719da48922
commit ca68d94cf7

View File

@ -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;
}