misc: chore: Use explicit types in CPU project

This commit is contained in:
Evan Husted 2025-01-25 14:04:43 -06:00
parent a97fd4beb1
commit 5099548856
18 changed files with 40 additions and 40 deletions

View file

@ -29,7 +29,7 @@ namespace Ryujinx.Cpu.AppleHv
public HvAddressSpace(MemoryBlock backingMemory, ulong asSize)
{
(_asBase, var ipaAllocator) = HvVm.CreateAddressSpace(backingMemory);
(_asBase, HvIpaAllocator ipaAllocator) = HvVm.CreateAddressSpace(backingMemory);
_backingSize = backingMemory.Size;
_userRange = new HvAddressSpaceRange(ipaAllocator);

View file

@ -45,7 +45,7 @@ namespace Ryujinx.Cpu.AppleHv
public HvMemoryBlockAllocation Allocate(ulong size, ulong alignment)
{
var allocation = Allocate(size, alignment, CreateBlock);
Allocation allocation = Allocate(size, alignment, CreateBlock);
return new HvMemoryBlockAllocation(this, allocation.Block, allocation.Offset, allocation.Size);
}

View file

@ -233,13 +233,13 @@ namespace Ryujinx.Cpu.AppleHv
yield break;
}
var guestRegions = GetPhysicalRegionsImpl(va, size);
IEnumerable<MemoryRange> guestRegions = GetPhysicalRegionsImpl(va, size);
if (guestRegions == null)
{
yield break;
}
foreach (var guestRegion in guestRegions)
foreach (MemoryRange guestRegion in guestRegions)
{
nint pointer = _backingMemory.GetPointer(guestRegion.Address, guestRegion.Size);
yield return new HostMemoryRange((nuint)(ulong)pointer, guestRegion.Size);
@ -254,7 +254,7 @@ namespace Ryujinx.Cpu.AppleHv
yield break;
}
foreach (var physicalRegion in GetPhysicalRegionsImpl(va, size))
foreach (MemoryRange physicalRegion in GetPhysicalRegionsImpl(va, size))
{
yield return physicalRegion;
}

View file

@ -41,7 +41,7 @@ namespace Ryujinx.Cpu.AppleHv
{
// Calculate our time delta in ticks based on the current clock frequency.
int result = TimeApi.mach_timebase_info(out var timeBaseInfo);
int result = TimeApi.mach_timebase_info(out MachTimebaseInfo timeBaseInfo);
Debug.Assert(result == 0);

View file

@ -39,7 +39,7 @@ namespace Ryujinx.Cpu.AppleHv
baseAddress = ipaAllocator.Allocate(block.Size, AsIpaAlignment);
}
var rwx = HvMemoryFlags.Read | HvMemoryFlags.Write | HvMemoryFlags.Exec;
HvMemoryFlags rwx = HvMemoryFlags.Read | HvMemoryFlags.Write | HvMemoryFlags.Exec;
HvApi.hv_vm_map((ulong)block.Pointer, baseAddress, block.Size, rwx).ThrowOnError();