Collapse AsSpan().Slice(..) calls into AsSpan(..) (#3145)
* 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)
This commit is contained in:
parent
fb935fd201
commit
644b497df1
11 changed files with 25 additions and 25 deletions
|
@ -7,9 +7,9 @@ namespace Ryujinx.HLE.Loaders.Executables
|
|||
class NroExecutable : Nro, IExecutable
|
||||
{
|
||||
public byte[] Program { get; }
|
||||
public Span<byte> Text => Program.AsSpan().Slice((int)TextOffset, (int)Header.NroSegments[0].Size);
|
||||
public Span<byte> Ro => Program.AsSpan().Slice((int)RoOffset, (int)Header.NroSegments[1].Size);
|
||||
public Span<byte> Data => Program.AsSpan().Slice((int)DataOffset, (int)Header.NroSegments[2].Size);
|
||||
public Span<byte> Text => Program.AsSpan((int)TextOffset, (int)Header.NroSegments[0].Size);
|
||||
public Span<byte> Ro => Program.AsSpan((int)RoOffset, (int)Header.NroSegments[1].Size);
|
||||
public Span<byte> Data => Program.AsSpan((int)DataOffset, (int)Header.NroSegments[2].Size);
|
||||
|
||||
public uint TextOffset => Header.NroSegments[0].FileOffset;
|
||||
public uint RoOffset => Header.NroSegments[1].FileOffset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue