diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/System.Private.CoreLib/src/System/Array.cs | 8 | ||||
-rw-r--r-- | src/System.Private.CoreLib/src/System/String.cs | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/System.Private.CoreLib/src/System/Array.cs b/src/System.Private.CoreLib/src/System/Array.cs index 2822401ff..12412a28f 100644 --- a/src/System.Private.CoreLib/src/System/Array.cs +++ b/src/System.Private.CoreLib/src/System/Array.cs @@ -910,22 +910,14 @@ namespace System if (array.Length - index < length) throw new ArgumentException(SR.Argument_InvalidOffLen); -#if !MONO ref T p = ref Unsafe.As<byte, T>(ref array.GetRawSzArrayData()); -#endif int i = index; int j = index + length - 1; while (i < j) { -#if MONO - T temp = array[i]; - array[i] = array[j]; - array[j] = temp; -#else T temp = Unsafe.Add(ref p, i); Unsafe.Add(ref p, i) = Unsafe.Add(ref p, j); Unsafe.Add(ref p, j) = temp; -#endif i++; j--; } diff --git a/src/System.Private.CoreLib/src/System/String.cs b/src/System.Private.CoreLib/src/System/String.cs index bb238f940..9846b15f2 100644 --- a/src/System.Private.CoreLib/src/System/String.cs +++ b/src/System.Private.CoreLib/src/System/String.cs @@ -403,7 +403,6 @@ namespace System return result; } -#if !MONO // TODO: Undo public static string Create<TState>(int length, TState state, SpanAction<char, TState> action) { if (action == null) @@ -428,7 +427,6 @@ namespace System public static implicit operator ReadOnlySpan<char>(string value) => value != null ? new ReadOnlySpan<char>(ref value.GetRawStringData(), value.Length) : default; -#endif public object Clone() { @@ -827,3 +825,13 @@ namespace System } } } + +#if MONO + +namespace System.Buffers +{ + public delegate void SpanAction<T, in TArg>(Span<T> span, TArg arg); + public delegate void ReadOnlySpanAction<T, in TArg>(ReadOnlySpan<T> span, TArg arg); +} + +#endif |