From 2e438f1da97787783d4cf132b1b25fcbe1029a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 19 Sep 2020 10:05:29 +0200 Subject: [PATCH] Remove superfluous null checks. --- OpenRA.Mods.Common/Widgets/ConfirmationDialogs.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/ConfirmationDialogs.cs b/OpenRA.Mods.Common/Widgets/ConfirmationDialogs.cs index 23b8a0b8ec..345fad3ada 100644 --- a/OpenRA.Mods.Common/Widgets/ConfirmationDialogs.cs +++ b/OpenRA.Mods.Common/Widgets/ConfirmationDialogs.cs @@ -71,10 +71,10 @@ namespace OpenRA.Mods.Common.Widgets cancelButton.OnClick = () => { Ui.CloseWindow(); - onCancel?.Invoke(); + onCancel(); }; - if (!string.IsNullOrEmpty(cancelText) && cancelButton != null) + if (!string.IsNullOrEmpty(cancelText)) cancelButton.GetText = () => cancelText; } @@ -84,10 +84,10 @@ namespace OpenRA.Mods.Common.Widgets otherButton.Bounds.Y += headerHeight; otherButton.OnClick = () => { - onOther?.Invoke(); + onOther(); }; - if (!string.IsNullOrEmpty(otherText) && otherButton != null) + if (!string.IsNullOrEmpty(otherText)) otherButton.GetText = () => otherText; } }