diff options
-rw-r--r-- | src/System.Private.CoreLib/src/System/Array.cs | 8 | ||||
-rw-r--r-- | src/System.Private.CoreLib/src/System/String.cs | 7 |
2 files changed, 4 insertions, 11 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..9ad81657e 100644 --- a/src/System.Private.CoreLib/src/System/String.cs +++ b/src/System.Private.CoreLib/src/System/String.cs @@ -402,8 +402,10 @@ namespace System } return result; } - -#if !MONO // TODO: Undo +#if MONO + 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 public static string Create<TState>(int length, TState state, SpanAction<char, TState> action) { if (action == null) @@ -428,7 +430,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() { |