mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-03 03:45:49 +00:00
Structural and Memory Safety Improvements, Analyzer Cleanup (ryubing/ryujinx!47)
See merge request ryubing/ryujinx!47
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Ryujinx.HLE.Loaders.Elf
|
||||
{
|
||||
enum ElfDynamicTag
|
||||
|
||||
@@ -2,13 +2,13 @@ namespace Ryujinx.HLE.Loaders.Elf
|
||||
{
|
||||
struct ElfSymbol32
|
||||
{
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
|
||||
public uint NameOffset;
|
||||
public uint ValueAddress;
|
||||
public uint Size;
|
||||
public byte Info;
|
||||
public byte Other;
|
||||
public ushort SectionIndex;
|
||||
#pragma warning restore CS0649
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,13 +2,13 @@ namespace Ryujinx.HLE.Loaders.Elf
|
||||
{
|
||||
struct ElfSymbol64
|
||||
{
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
|
||||
public uint NameOffset;
|
||||
public byte Info;
|
||||
public byte Other;
|
||||
public ushort SectionIndex;
|
||||
public ulong ValueAddress;
|
||||
public ulong Size;
|
||||
#pragma warning restore CS0649
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,9 +30,8 @@ namespace Ryujinx.HLE.Loaders.Npdm
|
||||
{
|
||||
throw new InvalidNpdmException("FsAccessHeader is corrupted!");
|
||||
}
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
int contentOwnerIdSize = reader.ReadInt32();
|
||||
#pragma warning restore IDE0059
|
||||
|
||||
_ = reader.ReadInt32(); // contentOwnerId size
|
||||
int dataAndContentOwnerIdSize = reader.ReadInt32();
|
||||
|
||||
if (dataAndContentOwnerIdSize != 0x1c)
|
||||
|
||||
@@ -68,11 +68,10 @@ namespace Ryujinx.HLE.Loaders.Npdm
|
||||
stream.Seek(0x30, SeekOrigin.Current);
|
||||
|
||||
int aci0Offset = reader.ReadInt32();
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
int aci0Size = reader.ReadInt32();
|
||||
|
||||
_ = reader.ReadInt32(); // aci0 size
|
||||
int acidOffset = reader.ReadInt32();
|
||||
int acidSize = reader.ReadInt32();
|
||||
#pragma warning restore IDE0059
|
||||
_ = reader.ReadInt32(); // acid size
|
||||
|
||||
Aci0 = new Aci0(stream, aci0Offset);
|
||||
Acid = new Acid(stream, acidOffset);
|
||||
|
||||
@@ -9,7 +9,6 @@ using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Graphics.Gpu;
|
||||
using Ryujinx.HLE.Loaders.Executables;
|
||||
using Ryujinx.Memory;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using static Ryujinx.HLE.HOS.ModLoader;
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ using Ryujinx.Cpu;
|
||||
using Ryujinx.HLE.HOS.SystemState;
|
||||
using Ryujinx.HLE.Loaders.Processes.Extensions;
|
||||
using Ryujinx.Horizon.Common;
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.HLE.Loaders.Processes
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user