Prefer generic overload when type is known (#430)

This commit is contained in:
Marco Carvalho
2024-12-22 16:23:35 -03:00
committed by GitHub
parent 8259f790d7
commit b5483d8fe0
8 changed files with 14 additions and 14 deletions

View File

@ -94,7 +94,7 @@ namespace Ryujinx.HLE.HOS.Services.Sm
{
if (_services.TryGetValue(name, out Type type))
{
ServiceAttribute serviceAttribute = (ServiceAttribute)type.GetCustomAttributes(typeof(ServiceAttribute)).First(service => ((ServiceAttribute)service).Name == name);
ServiceAttribute serviceAttribute = type.GetCustomAttributes<ServiceAttribute>().First(service => service.Name == name);
IpcService service = GetServiceInstance(type, context, serviceAttribute.Parameter);