mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-01 12:46:25 +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
|
@ -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()
|
||||
{
|
||||
string[] labels = _operandLabels.TryGetValue(Opcode, out string[] opLabels) ? opLabels : Array.Empty<string>();
|
||||
string[] labels = _operandLabels.TryGetValue(Opcode, out string[] opLabels) ? opLabels : [];
|
||||
string result = _resultType == null ? string.Empty : $"{_resultType} ";
|
||||
return $"{result}{Opcode}{_operands.ToString(labels)}";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue