diff options
author | Marek Safar <marek.safar@gmail.com> | 2018-09-19 15:19:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-19 15:19:22 +0300 |
commit | efd29b5cf854679349066e22ef9038b8cfe76d94 (patch) | |
tree | 2de750c1ac8a487d7f6d149592a6362ade6a5a77 /src/System.Private.CoreLib/shared/System/SpanHelpers.BinarySearch.cs | |
parent | f9124d69e41d42196510dd7234b2d53fed48ad4c (diff) | |
parent | 49f9ed0e66fc2d4cd682821396c6af5e80182048 (diff) |
Merge pull request #25 from ntherning/bump-corert
Bump to latest upstream
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) { |