misc: chore: Use collection expressions in Vulkan project

This commit is contained in:
Evan Husted 2025-01-26 15:32:25 -06:00
parent 9cb3b40ffc
commit ed2590a8ac
32 changed files with 212 additions and 240 deletions

View file

@ -84,8 +84,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; }
@ -522,7 +522,7 @@ namespace Ryujinx.Graphics.Vulkan
}
else
{
_pdReservedBindings = Array.Empty<int>();
_pdReservedBindings = [];
}
}
@ -832,7 +832,7 @@ namespace Ryujinx.Graphics.Vulkan
{
Logger.Error?.PrintMsg(LogClass.Gpu, $"Error querying Vulkan devices: {ex.Message}");
return Array.Empty<DeviceInfo>();
return [];
}
}
@ -845,7 +845,7 @@ namespace Ryujinx.Graphics.Vulkan
catch (Exception)
{
// If we got an exception here, Vulkan is most likely not supported.
return Array.Empty<DeviceInfo>();
return [];
}
}