1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Remove useless casts

This commit is contained in:
Nobuyoshi Nakada 2021-10-19 17:09:32 +09:00
parent ec021e469d
commit 8d6dbecc80
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -787,7 +787,7 @@ cref_replace_with_duplicated_cref_each_frame(const VALUE *vptr, int can_be_svar,
return (rb_cref_t *)new_cref; return (rb_cref_t *)new_cref;
case imemo_svar: case imemo_svar:
if (can_be_svar) { if (can_be_svar) {
return cref_replace_with_duplicated_cref_each_frame((const VALUE *)&((struct vm_svar *)v)->cref_or_me, FALSE, v); return cref_replace_with_duplicated_cref_each_frame(&((struct vm_svar *)v)->cref_or_me, FALSE, v);
} }
/* fall through */ /* fall through */
case imemo_ment: case imemo_ment:
@ -877,7 +877,7 @@ rb_vm_rewrite_cref(rb_cref_t *cref, VALUE old_klass, VALUE new_klass, rb_cref_t
new_cref = vm_cref_new_use_prev(CREF_CLASS(cref), METHOD_VISI_UNDEF, FALSE, cref, FALSE); new_cref = vm_cref_new_use_prev(CREF_CLASS(cref), METHOD_VISI_UNDEF, FALSE, cref, FALSE);
cref = CREF_NEXT(cref); cref = CREF_NEXT(cref);
*new_cref_ptr = new_cref; *new_cref_ptr = new_cref;
new_cref_ptr = (rb_cref_t **)&new_cref->next; new_cref_ptr = &new_cref->next;
} }
*new_cref_ptr = NULL; *new_cref_ptr = NULL;
} }