mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-26 21:17:12 +02:00
misc: chore: Use collection expressions everywhere else (except VP9)
This commit is contained in:
parent
0f857400b6
commit
ac838aa81d
59 changed files with 3246 additions and 2452 deletions
|
@ -122,7 +122,7 @@ namespace Ryujinx.Tests.Unicorn
|
|||
}
|
||||
|
||||
private static readonly int[] _xRegisters =
|
||||
{
|
||||
[
|
||||
Arm.UC_ARM_REG_R0,
|
||||
Arm.UC_ARM_REG_R1,
|
||||
Arm.UC_ARM_REG_R2,
|
||||
|
@ -138,12 +138,12 @@ namespace Ryujinx.Tests.Unicorn
|
|||
Arm.UC_ARM_REG_R12,
|
||||
Arm.UC_ARM_REG_R13,
|
||||
Arm.UC_ARM_REG_R14,
|
||||
Arm.UC_ARM_REG_R15,
|
||||
};
|
||||
Arm.UC_ARM_REG_R15
|
||||
];
|
||||
|
||||
#pragma warning disable IDE0051, IDE0052 // Remove unused private member
|
||||
private static readonly int[] _qRegisters =
|
||||
{
|
||||
[
|
||||
Arm.UC_ARM_REG_Q0,
|
||||
Arm.UC_ARM_REG_Q1,
|
||||
Arm.UC_ARM_REG_Q2,
|
||||
|
@ -159,8 +159,8 @@ namespace Ryujinx.Tests.Unicorn
|
|||
Arm.UC_ARM_REG_Q12,
|
||||
Arm.UC_ARM_REG_Q13,
|
||||
Arm.UC_ARM_REG_Q14,
|
||||
Arm.UC_ARM_REG_Q15,
|
||||
};
|
||||
Arm.UC_ARM_REG_Q15
|
||||
];
|
||||
#pragma warning restore IDE0051, IDE0052
|
||||
|
||||
public uint GetX(int index)
|
||||
|
@ -259,7 +259,7 @@ namespace Ryujinx.Tests.Unicorn
|
|||
Uc.MemWrite((long)address, value);
|
||||
}
|
||||
|
||||
public void MemoryWrite8(ulong address, byte value) => MemoryWrite(address, new[] { value });
|
||||
public void MemoryWrite8(ulong address, byte value) => MemoryWrite(address, [value]);
|
||||
public void MemoryWrite16(ulong address, short value) => MemoryWrite(address, BitConverter.GetBytes(value));
|
||||
public void MemoryWrite16(ulong address, ushort value) => MemoryWrite(address, BitConverter.GetBytes(value));
|
||||
public void MemoryWrite32(ulong address, int value) => MemoryWrite(address, BitConverter.GetBytes(value));
|
||||
|
|
|
@ -111,7 +111,7 @@ namespace Ryujinx.Tests.Unicorn
|
|||
}
|
||||
|
||||
private static readonly int[] _xRegisters =
|
||||
{
|
||||
[
|
||||
Arm64.UC_ARM64_REG_X0,
|
||||
Arm64.UC_ARM64_REG_X1,
|
||||
Arm64.UC_ARM64_REG_X2,
|
||||
|
@ -142,11 +142,11 @@ namespace Ryujinx.Tests.Unicorn
|
|||
Arm64.UC_ARM64_REG_X27,
|
||||
Arm64.UC_ARM64_REG_X28,
|
||||
Arm64.UC_ARM64_REG_X29,
|
||||
Arm64.UC_ARM64_REG_X30,
|
||||
};
|
||||
Arm64.UC_ARM64_REG_X30
|
||||
];
|
||||
|
||||
private static readonly int[] _qRegisters =
|
||||
{
|
||||
[
|
||||
Arm64.UC_ARM64_REG_Q0,
|
||||
Arm64.UC_ARM64_REG_Q1,
|
||||
Arm64.UC_ARM64_REG_Q2,
|
||||
|
@ -178,8 +178,8 @@ namespace Ryujinx.Tests.Unicorn
|
|||
Arm64.UC_ARM64_REG_Q28,
|
||||
Arm64.UC_ARM64_REG_Q29,
|
||||
Arm64.UC_ARM64_REG_Q30,
|
||||
Arm64.UC_ARM64_REG_Q31,
|
||||
};
|
||||
Arm64.UC_ARM64_REG_Q31
|
||||
];
|
||||
|
||||
public ulong GetX(int index)
|
||||
{
|
||||
|
@ -272,7 +272,7 @@ namespace Ryujinx.Tests.Unicorn
|
|||
Uc.MemWrite((long)address, value);
|
||||
}
|
||||
|
||||
public void MemoryWrite8(ulong address, byte value) => MemoryWrite(address, new[] { value });
|
||||
public void MemoryWrite8(ulong address, byte value) => MemoryWrite(address, [value]);
|
||||
public void MemoryWrite16(ulong address, short value) => MemoryWrite(address, BitConverter.GetBytes(value));
|
||||
public void MemoryWrite16(ulong address, ushort value) => MemoryWrite(address, BitConverter.GetBytes(value));
|
||||
public void MemoryWrite32(ulong address, int value) => MemoryWrite(address, BitConverter.GetBytes(value));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue