aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/Loaders/Executables/NsoExecutable.cs
diff options
context:
space:
mode:
authorBerkan Diler <b.diler@gmx.de>2022-02-22 14:32:10 +0100
committerGitHub <noreply@github.com>2022-02-22 10:32:10 -0300
commit644b497df17bae1790c31e23b04f20ff368d4e9e (patch)
treea0e57b35f4a800b1f1eb910a5d9331c911b5d2be /Ryujinx.HLE/Loaders/Executables/NsoExecutable.cs
parentfb935fd201a347de07762d14f81a985c8cdeb360 (diff)
Collapse AsSpan().Slice(..) calls into AsSpan(..) (#3145)1.1.47
* Collapse AsSpan().Slice(..) calls into AsSpan(..) Less code and a bit faster * Collapse an Array.Clear(array, 0, array.Length) call to Array.Clear(array)
Diffstat (limited to 'Ryujinx.HLE/Loaders/Executables/NsoExecutable.cs')
-rw-r--r--Ryujinx.HLE/Loaders/Executables/NsoExecutable.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Ryujinx.HLE/Loaders/Executables/NsoExecutable.cs b/Ryujinx.HLE/Loaders/Executables/NsoExecutable.cs
index 4f1c4ca1..f983536c 100644
--- a/Ryujinx.HLE/Loaders/Executables/NsoExecutable.cs
+++ b/Ryujinx.HLE/Loaders/Executables/NsoExecutable.cs
@@ -12,9 +12,9 @@ namespace Ryujinx.HLE.Loaders.Executables
class NsoExecutable : IExecutable
{
public byte[] Program { get; }
- public Span<byte> Text => Program.AsSpan().Slice((int)TextOffset, (int)TextSize);
- public Span<byte> Ro => Program.AsSpan().Slice((int)RoOffset, (int)RoSize);
- public Span<byte> Data => Program.AsSpan().Slice((int)DataOffset, (int)DataSize);
+ public Span<byte> Text => Program.AsSpan((int)TextOffset, (int)TextSize);
+ public Span<byte> Ro => Program.AsSpan((int)RoOffset, (int)RoSize);
+ public Span<byte> Data => Program.AsSpan((int)DataOffset, (int)DataSize);
public uint TextOffset { get; }
public uint RoOffset { get; }
@@ -58,7 +58,7 @@ namespace Ryujinx.HLE.Loaders.Executables
{
reader.GetSegmentSize(segmentType, out uint uncompressedSize).ThrowIfFailure();
- var span = Program.AsSpan().Slice((int)offset, (int)uncompressedSize);
+ var span = Program.AsSpan((int)offset, (int)uncompressedSize);
reader.ReadSegment(segmentType, span).ThrowIfFailure();