diff options
Diffstat (limited to 'src/Ryujinx.Common/Memory/StructByteArrayHelpers.cs')
-rw-r--r-- | src/Ryujinx.Common/Memory/StructByteArrayHelpers.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Ryujinx.Common/Memory/StructByteArrayHelpers.cs b/src/Ryujinx.Common/Memory/StructByteArrayHelpers.cs index 8693f5b8..f0f45273 100644 --- a/src/Ryujinx.Common/Memory/StructByteArrayHelpers.cs +++ b/src/Ryujinx.Common/Memory/StructByteArrayHelpers.cs @@ -10,7 +10,7 @@ namespace Ryujinx.Common.Memory byte _element; - public int Length => Size; + public readonly int Length => Size; public ref byte this[int index] => ref AsSpan()[index]; public Span<byte> AsSpan() => MemoryMarshal.CreateSpan(ref _element, Size); } @@ -22,7 +22,7 @@ namespace Ryujinx.Common.Memory byte _element; - public int Length => Size; + public readonly int Length => Size; public ref byte this[int index] => ref AsSpan()[index]; public Span<byte> AsSpan() => MemoryMarshal.CreateSpan(ref _element, Size); } @@ -34,7 +34,7 @@ namespace Ryujinx.Common.Memory byte _element; - public int Length => Size; + public readonly int Length => Size; public ref byte this[int index] => ref AsSpan()[index]; public Span<byte> AsSpan() => MemoryMarshal.CreateSpan(ref _element, Size); } @@ -46,7 +46,7 @@ namespace Ryujinx.Common.Memory byte _element; - public int Length => Size; + public readonly int Length => Size; public ref byte this[int index] => ref AsSpan()[index]; public Span<byte> AsSpan() => MemoryMarshal.CreateSpan(ref _element, Size); } @@ -58,7 +58,7 @@ namespace Ryujinx.Common.Memory byte _element; - public int Length => Size; + public readonly int Length => Size; public ref byte this[int index] => ref AsSpan()[index]; public Span<byte> AsSpan() => MemoryMarshal.CreateSpan(ref _element, Size); } @@ -70,7 +70,7 @@ namespace Ryujinx.Common.Memory byte _element; - public int Length => Size; + public readonly int Length => Size; public ref byte this[int index] => ref AsSpan()[index]; public Span<byte> AsSpan() => MemoryMarshal.CreateSpan(ref _element, Size); } |