Call used comparer directly instead of non-generic Compare wrapper (#51001)
authorMarek Safar <marek.safar@gmail.com>
Mon, 12 Apr 2021 18:07:06 +0000 (20:07 +0200)
committerGitHub <noreply@github.com>
Mon, 12 Apr 2021 18:07:06 +0000 (20:07 +0200)
src/libraries/System.Private.CoreLib/src/System/Type.Enum.cs

index a025edb..8915fc4 100644 (file)
@@ -124,7 +124,7 @@ namespace System
             // Insertion Sort these values in ascending order.
             // We use this O(n^2) algorithm, but it turns out that most of the time the elements are already in sorted order and
             // the common case performance will be faster than quick sorting this.
-            IComparer comparer = Comparer<object>.Default;
+            Comparer comparer = Comparer.Default;
             for (int i = 1; i < values.Length; i++)
             {
                 int j = i;