From e859bd5aa244df6c78f3cc8c19ac9105a0b1791e Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Sun, 26 Jan 2025 15:26:01 -0600 Subject: [PATCH] misc: chore: Fix object creation in Horizon generators --- .../Hipc/HipcGenerator.cs | 4 ++-- .../SyscallGenerator.cs | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Ryujinx.Horizon.Generators/Hipc/HipcGenerator.cs b/src/Ryujinx.Horizon.Generators/Hipc/HipcGenerator.cs index e66a3efa9..54ac9ccdd 100644 --- a/src/Ryujinx.Horizon.Generators/Hipc/HipcGenerator.cs +++ b/src/Ryujinx.Horizon.Generators/Hipc/HipcGenerator.cs @@ -68,7 +68,7 @@ namespace Ryujinx.Horizon.Generators.Hipc continue; } - CodeGenerator generator = new CodeGenerator(); + CodeGenerator generator = new(); string className = commandInterface.ClassDeclarationSyntax.Identifier.ToString(); generator.AppendLine("using Ryujinx.Horizon.Common;"); @@ -257,7 +257,7 @@ namespace Ryujinx.Horizon.Generators.Hipc generator.AppendLine(); } - List outParameters = new List(); + List outParameters = new(); string[] args = new string[method.ParameterList.Parameters.Count]; diff --git a/src/Ryujinx.Horizon.Kernel.Generators/SyscallGenerator.cs b/src/Ryujinx.Horizon.Kernel.Generators/SyscallGenerator.cs index 91eb08c77..5a81d8d80 100644 --- a/src/Ryujinx.Horizon.Kernel.Generators/SyscallGenerator.cs +++ b/src/Ryujinx.Horizon.Kernel.Generators/SyscallGenerator.cs @@ -128,7 +128,7 @@ namespace Ryujinx.Horizon.Kernel.Generators { SyscallSyntaxReceiver syntaxReceiver = (SyscallSyntaxReceiver)context.SyntaxReceiver; - CodeGenerator generator = new CodeGenerator(); + CodeGenerator generator = new(); generator.AppendLine("using Ryujinx.Common.Logging;"); generator.AppendLine("using Ryujinx.Cpu;"); @@ -145,7 +145,7 @@ namespace Ryujinx.Horizon.Kernel.Generators GenerateResultCheckHelper(generator); generator.AppendLine(); - List syscalls = new List(); + List syscalls = new(); foreach (MethodDeclarationSyntax method in syntaxReceiver.SvcImplementations) { @@ -200,11 +200,11 @@ namespace Ryujinx.Horizon.Kernel.Generators string[] args = new string[method.ParameterList.Parameters.Count]; int index = 0; - RegisterAllocatorA32 regAlloc = new RegisterAllocatorA32(); + RegisterAllocatorA32 regAlloc = new(); - List outParameters = new List(); - List logInArgs = new List(); - List logOutArgs = new List(); + List outParameters = new(); + List logInArgs = new(); + List logOutArgs = new(); foreach (ParameterSyntax methodParameter in method.ParameterList.Parameters) { @@ -321,9 +321,9 @@ namespace Ryujinx.Horizon.Kernel.Generators int registerIndex = 0; int index = 0; - List outParameters = new List(); - List logInArgs = new List(); - List logOutArgs = new List(); + List outParameters = new(); + List logInArgs = new(); + List logOutArgs = new(); foreach (ParameterSyntax methodParameter in method.ParameterList.Parameters) {