mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-05 16:26:26 +02:00
misc: chore: Fix object creation in HLE project
This commit is contained in:
parent
f1fd5c9366
commit
beab133c8d
48 changed files with 194 additions and 194 deletions
|
@ -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++)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue