misc: chore: Use collection expressions in HLE project

This commit is contained in:
Evan Husted
2025-01-26 15:43:02 -06:00
parent 3c2f283ec7
commit 70b767ef60
72 changed files with 312 additions and 299 deletions

View File

@@ -25,11 +25,11 @@ namespace Ryujinx.HLE.HOS.Services.Nv
[Service("nvdrv:t")]
class INvDrvServices : IpcService
{
private static readonly List<string> _deviceFileDebugRegistry = new()
{
private static readonly List<string> _deviceFileDebugRegistry =
[
"/dev/nvhost-dbg-gpu",
"/dev/nvhost-prof-gpu",
};
"/dev/nvhost-prof-gpu"
];
private static readonly Dictionary<string, Type> _deviceFileRegistry = new()
{
@@ -73,9 +73,10 @@ namespace Ryujinx.HLE.HOS.Services.Nv
if (_deviceFileRegistry.TryGetValue(path, out Type deviceFileClass))
{
ConstructorInfo constructor = deviceFileClass.GetConstructor(new[] { typeof(ServiceCtx), typeof(IVirtualMemoryManager), typeof(ulong) });
ConstructorInfo constructor = deviceFileClass.GetConstructor([typeof(ServiceCtx), typeof(IVirtualMemoryManager), typeof(ulong)
]);
NvDeviceFile deviceFile = (NvDeviceFile)constructor.Invoke(new object[] { context, _clientMemory, _owner });
NvDeviceFile deviceFile = (NvDeviceFile)constructor.Invoke([context, _clientMemory, _owner]);
deviceFile.Path = path;