Remove superfluous null checks.
This commit is contained in:
committed by
Paul Chote
parent
4627387ae3
commit
2e438f1da9
@@ -71,10 +71,10 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
cancelButton.OnClick = () =>
|
cancelButton.OnClick = () =>
|
||||||
{
|
{
|
||||||
Ui.CloseWindow();
|
Ui.CloseWindow();
|
||||||
onCancel?.Invoke();
|
onCancel();
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(cancelText) && cancelButton != null)
|
if (!string.IsNullOrEmpty(cancelText))
|
||||||
cancelButton.GetText = () => cancelText;
|
cancelButton.GetText = () => cancelText;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,10 +84,10 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
otherButton.Bounds.Y += headerHeight;
|
otherButton.Bounds.Y += headerHeight;
|
||||||
otherButton.OnClick = () =>
|
otherButton.OnClick = () =>
|
||||||
{
|
{
|
||||||
onOther?.Invoke();
|
onOther();
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(otherText) && otherButton != null)
|
if (!string.IsNullOrEmpty(otherText))
|
||||||
otherButton.GetText = () => otherText;
|
otherButton.GetText = () => otherText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user