From 56d373a0115c2a2c00a7c8a8d0144f34aa844be8 Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Sun, 26 Jan 2025 15:19:53 -0600 Subject: [PATCH] misc: chore: Fix object creation in SPIRV generator --- src/Spv.Generator/Module.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Spv.Generator/Module.cs b/src/Spv.Generator/Module.cs index 5945d9b6d..951494619 100644 --- a/src/Spv.Generator/Module.cs +++ b/src/Spv.Generator/Module.cs @@ -93,7 +93,7 @@ namespace Spv.Generator public Instruction AddExtInstImport(string import) { - DeterministicStringKey key = new DeterministicStringKey(import); + DeterministicStringKey key = new(import); if (_extInstImports.TryGetValue(key, out Instruction extInstImport)) { @@ -113,7 +113,7 @@ namespace Spv.Generator private void AddTypeDeclaration(Instruction instruction, bool forceIdAllocation) { - TypeDeclarationKey key = new TypeDeclarationKey(instruction); + TypeDeclarationKey key = new(instruction); if (!forceIdAllocation) { @@ -214,7 +214,7 @@ namespace Spv.Generator constant.Opcode == Op.OpConstantNull || constant.Opcode == Op.OpConstantComposite); - ConstantKey key = new ConstantKey(constant); + ConstantKey key = new(constant); if (_constants.TryGetValue(key, out Instruction global)) {