diff options
author | Niklas Therning <nitherni@microsoft.com> | 2018-09-18 13:21:49 +0300 |
---|---|---|
committer | Niklas Therning <nitherni@microsoft.com> | 2018-09-18 13:21:49 +0300 |
commit | 49f9ed0e66fc2d4cd682821396c6af5e80182048 (patch) | |
tree | 2de750c1ac8a487d7f6d149592a6362ade6a5a77 /src/System.Private.CoreLib/shared/System/SpanHelpers.BinarySearch.cs | |
parent | f9124d69e41d42196510dd7234b2d53fed48ad4c (diff) | |
parent | 267410d0ab65fabc61d6cd3e0e1c2ebed43ea661 (diff) |
Merge remote-tracking branch 'upstream/master' into bump-corert
Diffstat (limited to 'src/System.Private.CoreLib/shared/System/SpanHelpers.BinarySearch.cs')
-rw-r--r-- | src/System.Private.CoreLib/shared/System/SpanHelpers.BinarySearch.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/System.Private.CoreLib/shared/System/SpanHelpers.BinarySearch.cs b/src/System.Private.CoreLib/shared/System/SpanHelpers.BinarySearch.cs index 656b864e2..2aec70409 100644 --- a/src/System.Private.CoreLib/shared/System/SpanHelpers.BinarySearch.cs +++ b/src/System.Private.CoreLib/shared/System/SpanHelpers.BinarySearch.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -#if !netstandard using Internal.Runtime.CompilerServices; -#endif namespace System { @@ -26,7 +24,7 @@ namespace System } public static int BinarySearch<T, TComparable>( - ref T spanStart, int length, TComparable comparable) + ref T spanStart, int length, TComparable comparable) where TComparable : IComparable<T> { int lo = 0; @@ -64,11 +62,11 @@ namespace System } // Helper to allow sharing all code via IComparable<T> inlineable - internal struct ComparerComparable<T, TComparer> : IComparable<T> + internal readonly struct ComparerComparable<T, TComparer> : IComparable<T> where TComparer : IComparer<T> { - readonly T _value; - readonly TComparer _comparer; + private readonly T _value; + private readonly TComparer _comparer; public ComparerComparable(T value, TComparer comparer) { |