Fix ~3500 analyser issues

See merge request ryubing/ryujinx!44
This commit is contained in:
MrKev 2025-05-30 17:08:34 -05:00 committed by LotP
parent 417df486b1
commit 361d0c5632
622 changed files with 3080 additions and 2652 deletions

View file

@ -102,7 +102,7 @@ namespace Ryujinx.Horizon.Generators.Hipc
private static string GetNamespaceName(SyntaxNode syntaxNode)
{
while (syntaxNode != null && !(syntaxNode is NamespaceDeclarationSyntax))
while (syntaxNode is not null and not NamespaceDeclarationSyntax)
{
syntaxNode = syntaxNode.Parent;
}
@ -162,7 +162,7 @@ namespace Ryujinx.Horizon.Generators.Hipc
arg = $"new CommandArg({bufferFlags})";
}
}
else if (argType == CommandArgType.InArgument || argType == CommandArgType.OutArgument)
else if (argType is CommandArgType.InArgument or CommandArgType.OutArgument)
{
string alignment = GetTypeAlignmentExpression(compilation, parameter.Type);
@ -353,6 +353,7 @@ namespace Ryujinx.Horizon.Generators.Hipc
value = $"CommandSerialization.GetRef<{canonicalTypeName}>(processor.GetBufferRange({index}))";
isNonSpanBuffer = true;
}
break;
}
@ -470,7 +471,7 @@ namespace Ryujinx.Horizon.Generators.Hipc
{
if (outObjectsCount != 0)
{
generator.AppendLine($"processor.SetOutObjects(ref context, {ResponseVariableName}, {OutObjectsVariableName});");
generator.AppendLine($"HipcCommandProcessor.SetOutObjects(ref context, {ResponseVariableName}, {OutObjectsVariableName});");
}
if (buffersCount != 0)