From e3f6978c459c85498f21045575916f4c5bf9c1fd Mon Sep 17 00:00:00 2001 From: h3xds1nz Date: Fri, 7 Jun 2024 20:04:01 +0200 Subject: [PATCH] slightly faster even when it shortcircuits plus saves codegen size --- .../src/WindowsBase/MS/Internal/ContentType.cs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/ContentType.cs b/src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/ContentType.cs index f4a06463c14..1a54d282157 100644 --- a/src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/ContentType.cs +++ b/src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/ContentType.cs @@ -636,21 +636,7 @@ private static bool IsAsciiLetterOrDigit(char character) => /// /// input character /// - private static bool IsLinearWhiteSpaceChar(char ch) - { - if (ch > ' ') - { - return false; - } - - foreach (char c in LinearWhiteSpaceChars) - { - if (ch == c) - return true; - } - - return false; - } + private static bool IsLinearWhiteSpaceChar(char ch) => LinearWhiteSpaceChars.Contains(ch); /// /// Lazy initialization for the ParameterDictionary