misc: chore: Use collection expressions in Cpu

This commit is contained in:
Evan Husted
2025-01-26 15:41:05 -06:00
parent ed2590a8ac
commit 3e12865f51
26 changed files with 934 additions and 931 deletions

View File

@@ -21,7 +21,7 @@ namespace Ryujinx.Cpu.Jit.HostTracked
public AddressSpacePartitioned(MemoryTracking tracking, MemoryBlock backingMemory, NativePageTable nativePageTable, bool useProtectionMirrors)
{
_backingMemory = backingMemory;
_partitions = new();
_partitions = [];
_asAllocator = new(tracking, nativePageTable.Read, _partitions);
_updatePtCallback = nativePageTable.Update;
_useProtectionMirrors = useProtectionMirrors;

View File

@@ -340,7 +340,7 @@ namespace Ryujinx.Cpu.Jit
{
int pages = GetPagesCount(va, (uint)size, out va);
List<MemoryRange> regions = new();
List<MemoryRange> regions = [];
ulong regionStart = GetPhysicalAddressChecked(va);
ulong regionSize = PageSize;

View File

@@ -443,7 +443,7 @@ namespace Ryujinx.Cpu.Jit
return null;
}
List<HostMemoryRange> regions = new();
List<HostMemoryRange> regions = [];
ulong endVa = va + size;
try