mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-04 11:19:27 +02:00
misc: chore: Use collection expressions
This commit is contained in:
@@ -72,13 +72,13 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
||||
|
||||
servicePool = new MemoryRegion(DramMemoryMap.SlabHeapEnd, servicePoolSize);
|
||||
|
||||
return new[]
|
||||
{
|
||||
return
|
||||
[
|
||||
GetMemoryRegion(applicationPool),
|
||||
GetMemoryRegion(appletPool),
|
||||
GetMemoryRegion(servicePool),
|
||||
GetMemoryRegion(nvServicesPool),
|
||||
};
|
||||
GetMemoryRegion(nvServicesPool)
|
||||
];
|
||||
}
|
||||
|
||||
private static KMemoryRegionManager GetMemoryRegion(MemoryRegion region)
|
||||
|
||||
@@ -10,12 +10,13 @@ namespace Ryujinx.HLE.HOS.Kernel.Ipc
|
||||
{
|
||||
class KServerSession : KSynchronizationObject
|
||||
{
|
||||
private static readonly MemoryState[] _ipcMemoryStates = {
|
||||
private static readonly MemoryState[] _ipcMemoryStates =
|
||||
[
|
||||
MemoryState.IpcBuffer3,
|
||||
MemoryState.IpcBuffer0,
|
||||
MemoryState.IpcBuffer1,
|
||||
(MemoryState)0xfffce5d4, //This is invalid, shouldn't be accessed.
|
||||
};
|
||||
(MemoryState)0xfffce5d4 //This is invalid, shouldn't be accessed.
|
||||
];
|
||||
|
||||
private readonly struct Message
|
||||
{
|
||||
@@ -176,7 +177,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Ipc
|
||||
{
|
||||
_parent = parent;
|
||||
|
||||
_requests = new LinkedList<KSessionRequest>();
|
||||
_requests = [];
|
||||
}
|
||||
|
||||
public Result EnqueueRequest(KSessionRequest request)
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly int[] _memoryBlockPageShifts = { 12, 16, 21, 22, 25, 29, 30 };
|
||||
private static readonly int[] _memoryBlockPageShifts = [12, 16, 21, 22, 25, 29, 30];
|
||||
|
||||
#pragma warning disable IDE0052 // Remove unread private member
|
||||
private readonly ulong _heapAddress;
|
||||
|
||||
@@ -13,14 +13,15 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
||||
{
|
||||
abstract class KPageTableBase
|
||||
{
|
||||
private static readonly int[] _mappingUnitSizes = {
|
||||
private static readonly int[] _mappingUnitSizes =
|
||||
[
|
||||
0x1000,
|
||||
0x10000,
|
||||
0x200000,
|
||||
0x400000,
|
||||
0x2000000,
|
||||
0x40000000,
|
||||
};
|
||||
0x40000000
|
||||
];
|
||||
|
||||
private const ulong RegionAlignment = 0x200000;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user