From acb6c1408f19c4ead3de07bc263a2bac6a6ca978 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Fri, 21 Aug 2026 00:39:26 +0100 Subject: [PATCH] Remove unneeded `typename` usage --- src/check_asm.cpp | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/check_asm.cpp b/src/check_asm.cpp index 74c4b07bb..a05eeb17a 100644 --- a/src/check_asm.cpp +++ b/src/check_asm.cpp @@ -963,6 +963,19 @@ gb_internal void check_mnemonic(AsmCtx *asm_ctx, CheckerContext *ctx, Entity *tm return pseudo_alias_arg_operand_index(asm_ctx, alias, user_i); }; + auto operand_slot_type = [&](AsmCtx::Encoding const &form, int user_index) -> AsmCtx::OperandType { + int raw_slot = -1; + if (is_pseudo) { + raw_slot = user_operand_target_index(user_index); + } else { + raw_slot = asm_ctx->form_explicit_slot(form, user_index); + } + if (0 <= raw_slot && raw_slot < cast(int)gb_count_of(form.ops)) { + return form.ops[raw_slot]; + } + return asm_ctx->OP_NONE; + }; + int min_count = I32_MAX; int max_count = -1; @@ -996,21 +1009,6 @@ gb_internal void check_mnemonic(AsmCtx *asm_ctx, CheckerContext *ctx, Entity *tm } } - - auto operand_slot_type = [&](typename AsmCtx::Encoding const &form, int user_index) -> typename AsmCtx::OperandType { - int raw_slot = -1; - if (is_pseudo) { - raw_slot = user_operand_target_index(user_index); - } else { - raw_slot = asm_ctx->form_explicit_slot(form, user_index); - } - if (0 <= raw_slot && raw_slot < cast(int)gb_count_of(form.ops)) { - return form.ops[raw_slot]; - } - return asm_ctx->OP_NONE; - }; - - auto valid_spots = slice_make(heap_allocator(), max_count); defer (slice_free(&valid_spots, heap_allocator()));