8000 slightly faster even when it shortcircuits plus saves codegen size · dotnet/wpf@e3f6978 · GitHub
[go: up one dir, main page]

Skip to content

Commit e3f6978

Browse files
committed
slightly faster even when it shortcircuits plus saves codegen size
1 parent 4f9f766 commit e3f6978

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/Microsoft.DotNet.Wpf/src/WindowsBase/MS/Internal/ContentType.cs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -636,21 +636,7 @@ private static bool IsAsciiLetterOrDigit(char character) =>
636636
/// </summary>
637637
/// <param name="ch">input character</param>
638638
/// <returns></returns>
639-
private static bool IsLinearWhiteSpaceChar(char ch)
640-
{
641-
if (ch > ' ')
642-
{
643-
return false;
644-
}
645-
646-
foreach (char c in LinearWhiteSpaceChars)
647-
{
648-
if (ch == c)
649-
return true;
650-
}
651-
652-
return false;
653-
}
639+
private static bool IsLinearWhiteSpaceChar(char ch) => LinearWhiteSpaceChars.Contains(ch);
654640

655641
/// <summary>
656642
/// Lazy initialization for the ParameterDictionary

0 commit comments

Comments
 (0)
0