From 9adc9d431b2dce1c55b67b81af5a560e60bf1c19 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Wed, 21 Feb 2024 00:27:27 -0700 Subject: [PATCH] Simplify return to null-coalescing return. --- Terminal.Gui/View/Layout/ViewLayout.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Terminal.Gui/View/Layout/ViewLayout.cs b/Terminal.Gui/View/Layout/ViewLayout.cs index ec460fa25..3786a86eb 100644 --- a/Terminal.Gui/View/Layout/ViewLayout.cs +++ b/Terminal.Gui/View/Layout/ViewLayout.cs @@ -580,12 +580,7 @@ public partial class View { View? deep = FindDeepestView (v, rx, ry, out resultX, out resultY); - if (deep is null) - { - return v; - } - - return deep; + return deep ?? v; } } }