misc: chore: Use explicit types in Generator projects

This commit is contained in:
Evan Husted 2025-01-25 14:11:46 -06:00
parent fe661dc750
commit e6b393e420
9 changed files with 45 additions and 44 deletions

View file

@ -85,7 +85,7 @@ namespace Spv.Generator
public Instruction NewInstruction(Op opcode, uint id = Instruction.InvalidId, Instruction resultType = null)
{
var result = _instPool.Allocate();
Instruction result = _instPool.Allocate();
result.Set(opcode, id, resultType);
return result;
@ -93,7 +93,7 @@ namespace Spv.Generator
public Instruction AddExtInstImport(string import)
{
var key = new DeterministicStringKey(import);
DeterministicStringKey key = new DeterministicStringKey(import);
if (_extInstImports.TryGetValue(key, out Instruction extInstImport))
{
@ -113,7 +113,7 @@ namespace Spv.Generator
private void AddTypeDeclaration(Instruction instruction, bool forceIdAllocation)
{
var key = new TypeDeclarationKey(instruction);
TypeDeclarationKey key = new TypeDeclarationKey(instruction);
if (!forceIdAllocation)
{
@ -214,7 +214,7 @@ namespace Spv.Generator
constant.Opcode == Op.OpConstantNull ||
constant.Opcode == Op.OpConstantComposite);
var key = new ConstantKey(constant);
ConstantKey key = new ConstantKey(constant);
if (_constants.TryGetValue(key, out Instruction global))
{