mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-12-03 04:22:22 -05:00
misc: chore: Use collection expressions in HLE project
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
||||
|
||||
public KPageList()
|
||||
{
|
||||
Nodes = new LinkedList<KPageNode>();
|
||||
Nodes = [];
|
||||
}
|
||||
|
||||
public Result AddRange(ulong address, ulong pagesCount)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
||||
|
||||
public KSlabHeap(ulong pa, ulong itemSize, ulong size)
|
||||
{
|
||||
_items = new LinkedList<ulong>();
|
||||
_items = [];
|
||||
|
||||
int itemsCount = (int)(size / itemSize);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user