misc: chore: Use collection expressions (part 2)

This commit is contained in:
KeatonTheBot
2025-03-10 21:32:01 -05:00
parent c923c0043a
commit 340ec79e9f
176 changed files with 308 additions and 308 deletions
@@ -66,7 +66,7 @@ namespace Ryujinx.Graphics.Shader.Decoders
while (functionsQueue.TryDequeue(out DecodedFunction currentFunction))
{
List<Block> blocks = new();
List<Block> blocks = [];
Queue<Block> workQueue = new();
Dictionary<ulong, Block> visited = new();
@@ -520,7 +520,7 @@ namespace Ryujinx.Graphics.Shader.Decoders
if (lastOp.Name == InstName.Brx && block.Successors.Count == (hasNext ? 1 : 0))
{
HashSet<ulong> visited = new();
HashSet<ulong> visited = [];
InstBrx opBrx = new(lastOp.RawOpCode);
ulong baseOffset = lastOp.GetAbsoluteAddress();
@@ -566,7 +566,7 @@ namespace Ryujinx.Graphics.Shader.Decoders
// On a successful match, "BaseOffset" is the offset in bytes where the jump offsets are
// located on the constant buffer, and "UpperBound" is the total number of offsets for the BRX, minus 1.
HashSet<Block> visited = new();
HashSet<Block> visited = [];
var ldcLocation = FindFirstRegWrite(visited, new BlockLocation(block, block.OpCodes.Count - 1), brxReg);
if (ldcLocation.Block == null || ldcLocation.Block.OpCodes[ldcLocation.Index].Name != InstName.Ldc)
@@ -752,7 +752,7 @@ namespace Ryujinx.Graphics.Shader.Decoders
Block target = blocks[pushOp.GetAbsoluteAddress()];
Stack<PathBlockState> workQueue = new();
HashSet<Block> visited = new();
HashSet<Block> visited = [];
Stack<(ulong, MergeType)> branchStack = new();
void Push(PathBlockState pbs)