From e824b69a86776a10d3b71b8578d32d8217667c97 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 9 Nov 2023 16:29:49 +0900 Subject: [PATCH] Remove useless casts --- prism_compile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prism_compile.c b/prism_compile.c index ec8f7d58a1..dd8cdd9222 100644 --- a/prism_compile.c +++ b/prism_compile.c @@ -719,7 +719,7 @@ pm_lookup_local_index_with_depth(rb_iseq_t *iseq, pm_scope_node_t *scope_node, p static ID pm_constant_id_lookup(pm_scope_node_t *scope_node, pm_constant_id_t constant_id) { - return ((ID *)scope_node->constants)[constant_id - 1]; + return scope_node->constants[constant_id - 1]; } static rb_iseq_t * @@ -3782,7 +3782,7 @@ rb_translate_prism(pm_parser_t *parser, rb_iseq_t *iseq, pm_scope_node_t *scope_ for (size_t i = 0; i < locals->size; i++) { st_insert(index_lookup_table, locals->ids[i], i); } - scope_node->constants = (void *)constants; + scope_node->constants = constants; scope_node->index_lookup_table = index_lookup_table; pm_compile_node(iseq, (pm_node_t *)scope_node, ret, scope_node->base.location.start, false, (pm_scope_node_t *)scope_node);