Revert "? true : false" removal (#70631)

This commit is contained in:
Egor Bogatov authored and GitHub committed 2022-06-13 09:03:47 +02:00
1 parent 4f812579dc
commit a103efd28d
1 file changed
+2 -2
@@ -576,7 +576,7 @@ namespace System.Collections.Generic
if (typeof(T) == typeof(float)) return (float)(object)left < (float)(object)right;
if (typeof(T) == typeof(double)) return (double)(object)left < (double)(object)right;
if (typeof(T) == typeof(Half)) return (Half)(object)left < (Half)(object)right;
return left.CompareTo(right) < 0;
return left.CompareTo(right) < 0 ? true : false;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)] // compiles to a single comparison or method call
@@ -595,7 +595,7 @@ namespace System.Collections.Generic
if (typeof(T) == typeof(float)) return (float)(object)left > (float)(object)right;
if (typeof(T) == typeof(double)) return (double)(object)left > (double)(object)right;
if (typeof(T) == typeof(Half)) return (Half)(object)left > (Half)(object)right;
return left.CompareTo(right) > 0;
return left.CompareTo(right) > 0 ? true : false;
}
}