misc: chore: Fix object creation in HLE project

This commit is contained in:
Evan Husted 2025-01-26 15:15:26 -06:00
parent f1fd5c9366
commit beab133c8d
48 changed files with 194 additions and 194 deletions

View file

@ -105,7 +105,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
_blocksCount = blockShifts.Length;
_blocks = new Block[_memoryBlockPageShifts.Length];
ArraySegment<ulong> currBitmapStorage = new ArraySegment<ulong>(new ulong[CalculateManagementOverheadSize(size, blockShifts)]);
ArraySegment<ulong> currBitmapStorage = new(new ulong[CalculateManagementOverheadSize(size, blockShifts)]);
for (int i = 0; i < blockShifts.Length; i++)
{

View file

@ -143,7 +143,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
bool shouldFillPages,
byte fillValue)
{
using KScopedPageList scopedPageList = new KScopedPageList(Context.MemoryManager, pageList);
using KScopedPageList scopedPageList = new(Context.MemoryManager, pageList);
ulong currentVa = address;
@ -188,7 +188,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
}
}
using KScopedPageList scopedPageList = new KScopedPageList(Context.MemoryManager, pageList);
using KScopedPageList scopedPageList = new(Context.MemoryManager, pageList);
foreach (KPageNode pageNode in pageList)
{

View file

@ -617,7 +617,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
return result;
}
using OnScopeExit _ = new OnScopeExit(() => pageList.DecrementPagesReferenceCount(Context.MemoryManager));
using OnScopeExit _ = new(() => pageList.DecrementPagesReferenceCount(Context.MemoryManager));
return MapPages(address, pageList, permission, MemoryMapFlags.Private);
}
@ -769,7 +769,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
Result result = region.AllocatePages(out KPageList pageList, pagesCount);
using OnScopeExit _ = new OnScopeExit(() => pageList.DecrementPagesReferenceCount(Context.MemoryManager));
using OnScopeExit _ = new(() => pageList.DecrementPagesReferenceCount(Context.MemoryManager));
void CleanUpForError()
{
@ -1341,7 +1341,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
Result result = region.AllocatePages(out KPageList pageList, remainingPages);
using OnScopeExit _ = new OnScopeExit(() => pageList.DecrementPagesReferenceCount(Context.MemoryManager));
using OnScopeExit _ = new(() => pageList.DecrementPagesReferenceCount(Context.MemoryManager));
void CleanUpForError()
{
@ -1867,7 +1867,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
ulong dstLastPagePa = 0;
ulong currentVa = va;
using OnScopeExit _ = new OnScopeExit(() =>
using OnScopeExit _ = new(() =>
{
if (dstFirstPagePa != 0)
{