misc: chore: Use collection expressions

This commit is contained in:
KeatonTheBot
2025-03-06 20:46:29 -06:00
parent 4d5757417e
commit e2973a875a
236 changed files with 9843 additions and 7561 deletions
@@ -81,8 +81,8 @@ namespace Ryujinx.Graphics.Vulkan
private readonly string _preferredGpuId;
private int[] _pdReservedBindings;
private readonly static int[] _pdReservedBindingsNvn = { 3, 18, 21, 36, 30 };
private readonly static int[] _pdReservedBindingsOgl = { 17, 18, 34, 35, 36 };
private readonly static int[] _pdReservedBindingsNvn = [3, 18, 21, 36, 30];
private readonly static int[] _pdReservedBindingsOgl = [17, 18, 34, 35, 36];
internal Vendor Vendor { get; private set; }
internal bool IsAmdWindows { get; private set; }
@@ -110,9 +110,9 @@ namespace Ryujinx.Graphics.Vulkan
_getRequiredExtensions = requiredExtensionsFunc;
_preferredGpuId = preferredGpuId;
Api = api;
Shaders = new HashSet<ShaderCollection>();
Textures = new HashSet<ITexture>();
Samplers = new HashSet<SamplerHolder>();
Shaders = [];
Textures = [];
Samplers = [];
if (OperatingSystem.IsMacOS())
{
@@ -484,7 +484,7 @@ namespace Ryujinx.Graphics.Vulkan
}
else
{
_pdReservedBindings = Array.Empty<int>();
_pdReservedBindings = [];
}
}
@@ -794,7 +794,7 @@ namespace Ryujinx.Graphics.Vulkan
{
Logger.Error?.PrintMsg(LogClass.Gpu, $"Error querying Vulkan devices: {ex.Message}");
return Array.Empty<DeviceInfo>();
return [];
}
}
@@ -807,7 +807,7 @@ namespace Ryujinx.Graphics.Vulkan
catch (Exception)
{
// If we got an exception here, Vulkan is most likely not supported.
return Array.Empty<DeviceInfo>();
return [];
}
}