mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-07 18:16:27 +02:00
misc: chore: Use collection expressions in Generator projects
This commit is contained in:
parent
45125c16cf
commit
2853f5b426
8 changed files with 27 additions and 27 deletions
|
@ -145,7 +145,7 @@ namespace Ryujinx.Horizon.Kernel.Generators
|
|||
GenerateResultCheckHelper(generator);
|
||||
generator.AppendLine();
|
||||
|
||||
List<SyscallIdAndName> syscalls = new();
|
||||
List<SyscallIdAndName> syscalls = [];
|
||||
|
||||
foreach (MethodDeclarationSyntax method in syntaxReceiver.SvcImplementations)
|
||||
{
|
||||
|
@ -202,9 +202,9 @@ namespace Ryujinx.Horizon.Kernel.Generators
|
|||
|
||||
RegisterAllocatorA32 regAlloc = new();
|
||||
|
||||
List<OutParameter> outParameters = new();
|
||||
List<string> logInArgs = new();
|
||||
List<string> logOutArgs = new();
|
||||
List<OutParameter> outParameters = [];
|
||||
List<string> logInArgs = [];
|
||||
List<string> logOutArgs = [];
|
||||
|
||||
foreach (ParameterSyntax methodParameter in method.ParameterList.Parameters)
|
||||
{
|
||||
|
@ -321,9 +321,9 @@ namespace Ryujinx.Horizon.Kernel.Generators
|
|||
int registerIndex = 0;
|
||||
int index = 0;
|
||||
|
||||
List<OutParameter> outParameters = new();
|
||||
List<string> logInArgs = new();
|
||||
List<string> logOutArgs = new();
|
||||
List<OutParameter> outParameters = [];
|
||||
List<string> logInArgs = [];
|
||||
List<string> logOutArgs = [];
|
||||
|
||||
foreach (ParameterSyntax methodParameter in method.ParameterList.Parameters)
|
||||
{
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace Ryujinx.Horizon.Kernel.Generators
|
|||
|
||||
public SyscallSyntaxReceiver()
|
||||
{
|
||||
SvcImplementations = new List<MethodDeclarationSyntax>();
|
||||
SvcImplementations = [];
|
||||
}
|
||||
|
||||
public void OnVisitSyntaxNode(SyntaxNode syntaxNode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue