mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-03 03:46:26 +02:00
misc: chore: Use collection expressions in HLE project
This commit is contained in:
parent
3c2f283ec7
commit
70b767ef60
72 changed files with 312 additions and 299 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue