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

Removed useless casts

This commit is contained in:
Nobuyoshi Nakada 2020-09-05 17:28:06 +09:00
parent 72757fb596
commit 5c49bb5486
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -1503,13 +1503,12 @@ r_string(struct load_arg *arg)
static VALUE
r_entry0(VALUE v, st_index_t num, struct load_arg *arg)
{
st_data_t real_obj = (VALUE)Qundef;
if (arg->compat_tbl && st_lookup(arg->compat_tbl, v, &real_obj)) {
st_insert(arg->data, num, (st_data_t)real_obj);
}
else {
st_insert(arg->data, num, (st_data_t)v);
st_data_t real_obj = (st_data_t)v;
if (arg->compat_tbl) {
/* real_obj is kept if not found */
st_lookup(arg->compat_tbl, v, &real_obj);
}
st_insert(arg->data, num, real_obj);
return v;
}