mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-13 22:37:07 +00:00
misc: chore: Use collection expressions
This commit is contained in:
parent
4d5757417e
commit
e2973a875a
236 changed files with 9843 additions and 7561 deletions
|
|
@ -232,14 +232,14 @@ namespace Spv.Generator
|
|||
|
||||
private static readonly Dictionary<Specification.Op, string[]> _operandLabels = new()
|
||||
{
|
||||
{ Specification.Op.OpConstant, new [] { "Value" } },
|
||||
{ Specification.Op.OpTypeInt, new [] { "Width", "Signed" } },
|
||||
{ Specification.Op.OpTypeFloat, new [] { "Width" } },
|
||||
{ Specification.Op.OpConstant, ["Value"] },
|
||||
{ Specification.Op.OpTypeInt, ["Width", "Signed"] },
|
||||
{ Specification.Op.OpTypeFloat, ["Width"] },
|
||||
};
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var labels = _operandLabels.TryGetValue(Opcode, out var opLabels) ? opLabels : Array.Empty<string>();
|
||||
var labels = _operandLabels.TryGetValue(Opcode, out var opLabels) ? opLabels : [];
|
||||
var result = _resultType == null ? string.Empty : $"{_resultType} ";
|
||||
return $"{result}{Opcode}{_operands.ToString(labels)}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ namespace Spv.Generator
|
|||
}
|
||||
|
||||
private readonly IEnumerable<IOperand> AllOperands => new[] { Operand1, Operand2, Operand3, Operand4, Operand5 }
|
||||
.Concat(Overflow ?? Array.Empty<IOperand>())
|
||||
.Concat(Overflow ?? [])
|
||||
.Take(Count);
|
||||
|
||||
public readonly override string ToString()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue