mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-25 00:20:06 +02:00
misc: chore: Use collection expressions (part 2)
This commit is contained in:
@@ -41,7 +41,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
||||
Type = type;
|
||||
Condition = condition;
|
||||
|
||||
_nodes = new LinkedList<IAstNode>();
|
||||
_nodes = [];
|
||||
}
|
||||
|
||||
public void Add(IAstNode node)
|
||||
|
||||
@@ -17,8 +17,8 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
||||
|
||||
private AstOperand()
|
||||
{
|
||||
Defs = new HashSet<IAstNode>();
|
||||
Uses = new HashSet<IAstNode>();
|
||||
Defs = [];
|
||||
Uses = [];
|
||||
|
||||
VarType = AggregateType.S32;
|
||||
}
|
||||
|
||||
@@ -429,7 +429,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
||||
{
|
||||
AstBlock block = bottom;
|
||||
|
||||
List<AstBlock> path = new();
|
||||
List<AstBlock> path = [];
|
||||
|
||||
while (block != top)
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
||||
InArguments = inArguments;
|
||||
OutArguments = outArguments;
|
||||
|
||||
Locals = new HashSet<AstOperand>();
|
||||
Locals = [];
|
||||
}
|
||||
|
||||
public AggregateType GetArgumentType(int index)
|
||||
|
||||
@@ -343,7 +343,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
||||
|
||||
private static AggregateType GetVarTypeFromUses(Operand dest)
|
||||
{
|
||||
HashSet<Operand> visited = new();
|
||||
HashSet<Operand> visited = [];
|
||||
|
||||
Queue<Operand> pending = new();
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
||||
|
||||
public StructuredProgramInfo()
|
||||
{
|
||||
Functions = new List<StructuredFunction>();
|
||||
Functions = [];
|
||||
|
||||
IoDefinitions = new HashSet<IoDefinition>();
|
||||
IoDefinitions = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user