misc: chore: Use explicit types in the Avalonia project

This commit is contained in:
Evan Husted
2025-01-25 14:00:23 -06:00
parent 3b5f6170d1
commit be3bd0bcb5
69 changed files with 367 additions and 348 deletions

View File

@@ -16,7 +16,7 @@ namespace Ryujinx.Ava.Utilities.SystemInfo
if (cpuName == null)
{
var cpuDict = new Dictionary<string, string>(StringComparer.Ordinal)
Dictionary<string, string> cpuDict = new Dictionary<string, string>(StringComparer.Ordinal)
{
["model name"] = null,
["Processor"] = null,
@@ -28,7 +28,7 @@ namespace Ryujinx.Ava.Utilities.SystemInfo
cpuName = cpuDict["model name"] ?? cpuDict["Processor"] ?? cpuDict["Hardware"] ?? "Unknown";
}
var memDict = new Dictionary<string, string>(StringComparer.Ordinal)
Dictionary<string, string> memDict = new Dictionary<string, string>(StringComparer.Ordinal)
{
["MemTotal"] = null,
["MemAvailable"] = null,

View File

@@ -40,10 +40,10 @@ namespace Ryujinx.Ava.Utilities.SystemInfo
static ulong GetVMInfoAvailableMemory()
{
var port = mach_host_self();
uint port = mach_host_self();
uint pageSize = 0;
var result = host_page_size(port, ref pageSize);
int result = host_page_size(port, ref pageSize);
if (result != 0)
{

View File

@@ -34,7 +34,7 @@ namespace Ryujinx.Ava.Utilities.SystemInfo
if (cpuObjs != null)
{
foreach (var cpuObj in cpuObjs)
foreach (ManagementBaseObject cpuObj in cpuObjs)
{
return cpuObj["Name"].ToString().Trim();
}