misc: chore: Use explicit types in Generator projects

This commit is contained in:
Evan Husted 2025-01-25 14:11:46 -06:00
parent fe661dc750
commit e6b393e420
9 changed files with 45 additions and 44 deletions

View file

@ -147,7 +147,7 @@ namespace Ryujinx.Horizon.Kernel.Generators
List<SyscallIdAndName> syscalls = new List<SyscallIdAndName>();
foreach (var method in syntaxReceiver.SvcImplementations)
foreach (MethodDeclarationSyntax method in syntaxReceiver.SvcImplementations)
{
GenerateMethod32(generator, context.Compilation, method);
GenerateMethod64(generator, context.Compilation, method);
@ -206,7 +206,7 @@ namespace Ryujinx.Horizon.Kernel.Generators
List<string> logInArgs = new List<string>();
List<string> logOutArgs = new List<string>();
foreach (var methodParameter in method.ParameterList.Parameters)
foreach (ParameterSyntax methodParameter in method.ParameterList.Parameters)
{
string name = methodParameter.Identifier.Text;
string argName = GetPrefixedArgName(name);
@ -325,7 +325,7 @@ namespace Ryujinx.Horizon.Kernel.Generators
List<string> logInArgs = new List<string>();
List<string> logOutArgs = new List<string>();
foreach (var methodParameter in method.ParameterList.Parameters)
foreach (ParameterSyntax methodParameter in method.ParameterList.Parameters)
{
string name = methodParameter.Identifier.Text;
string argName = GetPrefixedArgName(name);
@ -468,7 +468,7 @@ namespace Ryujinx.Horizon.Kernel.Generators
generator.EnterScope($"public static void Dispatch{suffix}(Syscall syscall, {TypeExecutionContext} context, int id)");
generator.EnterScope("switch (id)");
foreach (var syscall in syscalls)
foreach (SyscallIdAndName syscall in syscalls)
{
generator.AppendLine($"case {syscall.Id}:");
generator.IncreaseIndentation();

View file

@ -27,7 +27,7 @@ namespace Ryujinx.Horizon.Kernel.Generators
return;
}
foreach (var memberDeclaration in classDeclaration.Members)
foreach (MemberDeclarationSyntax memberDeclaration in classDeclaration.Members)
{
if (memberDeclaration is MethodDeclarationSyntax methodDeclaration)
{