瀏覽代碼

Make this string comparison faster.

Brandon Thetford 1 年之前
父節點
當前提交
1bc3595d0e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Terminal.Gui/Application.cs

+ 1 - 1
Terminal.Gui/Application.cs

@@ -253,7 +253,7 @@ public static partial class Application
             else
             {
                 List<Type> drivers = GetDriverTypes ();
-                Type driverType = drivers.FirstOrDefault (t => t.Name.ToLower () == ForceDriver.ToLower ());
+                Type driverType = drivers.FirstOrDefault (t => t.Name.Equals (ForceDriver, StringComparison.InvariantCultureIgnoreCase));
 
                 if (driverType is { })
                 {