From 67852bb3449744069620c358009280ae2c8b8355 Mon Sep 17 00:00:00 2001 From: Stone_Red <56473591+Stone-Red-Code@users.noreply.github.com> Date: Tue, 16 Jun 2026 22:34:13 +0200 Subject: [PATCH] Add NotNullWhen attribute to TryGetWindow and TryGetWindowAndArgs methods --- Utils/YesNtWindowStatements.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Utils/YesNtWindowStatements.cs b/Utils/YesNtWindowStatements.cs index b52f2dd..fe99c2d 100644 --- a/Utils/YesNtWindowStatements.cs +++ b/Utils/YesNtWindowStatements.cs @@ -4,6 +4,7 @@ using RemSox.UI.GUI.UIEelements.Controls; using RemSox.UI.GUI.UIEelements.Shapes; using RemSox.UI.GUI.Windows; +using System.Diagnostics.CodeAnalysis; using System.Drawing; using YesNt.Interpreter.Runtime; @@ -852,7 +853,7 @@ public class YesNtWindowStatements(Process ownerProcess) // --- Helpers --- - private bool TryGetWindow(string input, out Window? win) + private bool TryGetWindow(string input, [NotNullWhen(true)] out Window? win) { win = null; string[] tokens = ParseTokens(input.Trim()); @@ -865,7 +866,7 @@ public class YesNtWindowStatements(Process ownerProcess) return false; } - private bool TryGetWindowAndArgs(string input, out Window? win, out string[] tokens, out bool named) + private bool TryGetWindowAndArgs(string input, [NotNullWhen(true)] out Window? win, out string[] tokens, out bool named) { win = null; tokens = ParseTokens(input.Trim());