aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Common/Memory/StructByteArrayHelpers.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2022-08-11 18:07:37 -0300
committerGitHub <noreply@github.com>2022-08-11 18:07:37 -0300
commita5ff0024fb33964c802e1712e5b11a52390603e7 (patch)
treefdc0b7781541215cd728b8e0288b729f73dbad88 /Ryujinx.Common/Memory/StructByteArrayHelpers.cs
parentf9661a54d21c3020783d14fd9935bb7b741a6915 (diff)
Rename ToSpan to AsSpan (#3556)1.1.211
Diffstat (limited to 'Ryujinx.Common/Memory/StructByteArrayHelpers.cs')
-rw-r--r--Ryujinx.Common/Memory/StructByteArrayHelpers.cs24
1 files changed, 12 insertions, 12 deletions
diff --git a/Ryujinx.Common/Memory/StructByteArrayHelpers.cs b/Ryujinx.Common/Memory/StructByteArrayHelpers.cs
index 0c17dc10..8693f5b8 100644
--- a/Ryujinx.Common/Memory/StructByteArrayHelpers.cs
+++ b/Ryujinx.Common/Memory/StructByteArrayHelpers.cs
@@ -11,8 +11,8 @@ namespace Ryujinx.Common.Memory
byte _element;
public int Length => Size;
- public ref byte this[int index] => ref ToSpan()[index];
- public Span<byte> ToSpan() => MemoryMarshal.CreateSpan(ref _element, Size);
+ public ref byte this[int index] => ref AsSpan()[index];
+ public Span<byte> AsSpan() => MemoryMarshal.CreateSpan(ref _element, Size);
}
[StructLayout(LayoutKind.Sequential, Size = Size, Pack = 1)]
@@ -23,8 +23,8 @@ namespace Ryujinx.Common.Memory
byte _element;
public int Length => Size;
- public ref byte this[int index] => ref ToSpan()[index];
- public Span<byte> ToSpan() => MemoryMarshal.CreateSpan(ref _element, Size);
+ public ref byte this[int index] => ref AsSpan()[index];
+ public Span<byte> AsSpan() => MemoryMarshal.CreateSpan(ref _element, Size);
}
[StructLayout(LayoutKind.Sequential, Size = Size, Pack = 1)]
@@ -35,8 +35,8 @@ namespace Ryujinx.Common.Memory
byte _element;
public int Length => Size;
- public ref byte this[int index] => ref ToSpan()[index];
- public Span<byte> ToSpan() => MemoryMarshal.CreateSpan(ref _element, Size);
+ public ref byte this[int index] => ref AsSpan()[index];
+ public Span<byte> AsSpan() => MemoryMarshal.CreateSpan(ref _element, Size);
}
[StructLayout(LayoutKind.Sequential, Size = Size, Pack = 1)]
@@ -47,8 +47,8 @@ namespace Ryujinx.Common.Memory
byte _element;
public int Length => Size;
- public ref byte this[int index] => ref ToSpan()[index];
- public Span<byte> ToSpan() => MemoryMarshal.CreateSpan(ref _element, Size);
+ public ref byte this[int index] => ref AsSpan()[index];
+ public Span<byte> AsSpan() => MemoryMarshal.CreateSpan(ref _element, Size);
}
[StructLayout(LayoutKind.Sequential, Size = Size, Pack = 1)]
@@ -59,8 +59,8 @@ namespace Ryujinx.Common.Memory
byte _element;
public int Length => Size;
- public ref byte this[int index] => ref ToSpan()[index];
- public Span<byte> ToSpan() => MemoryMarshal.CreateSpan(ref _element, Size);
+ public ref byte this[int index] => ref AsSpan()[index];
+ public Span<byte> AsSpan() => MemoryMarshal.CreateSpan(ref _element, Size);
}
[StructLayout(LayoutKind.Sequential, Size = Size, Pack = 1)]
@@ -71,7 +71,7 @@ namespace Ryujinx.Common.Memory
byte _element;
public int Length => Size;
- public ref byte this[int index] => ref ToSpan()[index];
- public Span<byte> ToSpan() => MemoryMarshal.CreateSpan(ref _element, Size);
+ public ref byte this[int index] => ref AsSpan()[index];
+ public Span<byte> AsSpan() => MemoryMarshal.CreateSpan(ref _element, Size);
}
}