From 8e6a2511387f47894407ea92494c0f5d3cdb51b8 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 18 Oct 2023 18:27:01 +0900 Subject: [PATCH] Remove unnecessary and misleading casts --- compile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compile.c b/compile.c index fcae05da9f..3dc4152700 100644 --- a/compile.c +++ b/compile.c @@ -3886,11 +3886,11 @@ iseq_specialized_instruction(rb_iseq_t *iseq, INSN *iobj) case idMin: case idHash: { - rb_num_t num = (rb_num_t)iobj->operands[0]; + VALUE num = iobj->operands[0]; iobj->insn_id = BIN(opt_newarray_send); iobj->operands = compile_data_calloc2(iseq, insn_len(iobj->insn_id) - 1, sizeof(VALUE)); - iobj->operands[0] = (VALUE)num; - iobj->operands[1] = (VALUE)rb_id2sym(vm_ci_mid(ci)); + iobj->operands[0] = num; + iobj->operands[1] = rb_id2sym(vm_ci_mid(ci)); iobj->operand_size = insn_len(iobj->insn_id) - 1; ELEM_REMOVE(&niobj->link); return COMPILE_OK;