mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-16 21:06:29 +02:00
misc: chore: Use collection expressions in Shader project
This commit is contained in:
parent
a5dbcb75d0
commit
95f9e548ca
38 changed files with 198 additions and 204 deletions
|
@ -34,11 +34,11 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
|
|||
|
||||
public BasicBlock()
|
||||
{
|
||||
Operations = new LinkedList<INode>();
|
||||
Operations = [];
|
||||
|
||||
Predecessors = new List<BasicBlock>();
|
||||
Predecessors = [];
|
||||
|
||||
DominanceFrontiers = new HashSet<BasicBlock>();
|
||||
DominanceFrontiers = [];
|
||||
}
|
||||
|
||||
public BasicBlock(int index) : this()
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
|
|||
|
||||
private Operand()
|
||||
{
|
||||
UseOps = new HashSet<INode>();
|
||||
UseOps = [];
|
||||
}
|
||||
|
||||
public Operand(OperandType type) : this()
|
||||
|
|
|
@ -27,11 +27,11 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
|
|||
value.AsgOp = this;
|
||||
}
|
||||
|
||||
_dests = new[] { value };
|
||||
_dests = [value];
|
||||
}
|
||||
else
|
||||
{
|
||||
_dests = Array.Empty<Operand>();
|
||||
_dests = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
|
|||
}
|
||||
else
|
||||
{
|
||||
_dests = Array.Empty<Operand>();
|
||||
_dests = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,11 +94,11 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
|
|||
{
|
||||
dest.AsgOp = this;
|
||||
|
||||
_dests = new[] { dest };
|
||||
_dests = [dest];
|
||||
}
|
||||
else
|
||||
{
|
||||
_dests = Array.Empty<Operand>();
|
||||
_dests = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,11 +111,11 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
|
|||
{
|
||||
dest.AsgOp = this;
|
||||
|
||||
_dests = new[] { dest };
|
||||
_dests = [dest];
|
||||
}
|
||||
else
|
||||
{
|
||||
_dests = Array.Empty<Operand>();
|
||||
_dests = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -258,7 +258,7 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
|
|||
source.UseOps.Add(this);
|
||||
}
|
||||
|
||||
_sources = new Operand[] { source };
|
||||
_sources = [source];
|
||||
}
|
||||
|
||||
public void TurnDoubleIntoFloat()
|
||||
|
|
|
@ -35,9 +35,9 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
|
|||
|
||||
public PhiNode(Operand dest)
|
||||
{
|
||||
_blocks = new HashSet<BasicBlock>();
|
||||
_blocks = [];
|
||||
|
||||
_sources = new List<PhiSource>();
|
||||
_sources = [];
|
||||
|
||||
dest.AsgOp = this;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue