Skip to content

Commit eecf5f7

Browse files
committed
shape.c: remove unecessary casts
1 parent 97db70f commit eecf5f7

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

shape.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ rb_shape_transition_shape_frozen(VALUE obj)
714714
}
715715

716716
bool dont_care;
717-
next_shape = get_next_shape_internal(shape, (ID)id_frozen, SHAPE_FROZEN, &dont_care, true);
717+
next_shape = get_next_shape_internal(shape, id_frozen, SHAPE_FROZEN, &dont_care, true);
718718

719719
RUBY_ASSERT(next_shape);
720720
return next_shape;
@@ -727,12 +727,12 @@ shape_transition_too_complex(rb_shape_t *original_shape)
727727

728728
if (original_shape->flags & SHAPE_FL_FROZEN) {
729729
bool dont_care;
730-
next_shape = get_next_shape_internal(next_shape, (ID)id_frozen, SHAPE_FROZEN, &dont_care, false);
730+
next_shape = get_next_shape_internal(next_shape, id_frozen, SHAPE_FROZEN, &dont_care, false);
731731
}
732732

733733
if (original_shape->flags & SHAPE_FL_HAS_OBJECT_ID) {
734734
bool dont_care;
735-
next_shape = get_next_shape_internal(next_shape, (ID)internal_object_id, SHAPE_OBJ_ID, &dont_care, false);
735+
next_shape = get_next_shape_internal(next_shape, internal_object_id, SHAPE_OBJ_ID, &dont_care, false);
736736
}
737737

738738
return next_shape;
@@ -775,7 +775,7 @@ rb_shape_object_id_shape(VALUE obj)
775775
}
776776

777777
bool dont_care;
778-
rb_shape_t* next_shape = get_next_shape_internal(shape, (ID)internal_object_id, SHAPE_OBJ_ID, &dont_care, true);
778+
rb_shape_t* next_shape = get_next_shape_internal(shape, internal_object_id, SHAPE_OBJ_ID, &dont_care, true);
779779
RUBY_ASSERT(next_shape);
780780
return next_shape;
781781
}
@@ -1396,7 +1396,7 @@ Init_default_shapes(void)
13961396
#if RUBY_DEBUG
13971397
rb_shape_t *special_const_shape =
13981398
#endif
1399-
get_next_shape_internal(root, (ID)id_frozen, SHAPE_FROZEN, &dont_care, true);
1399+
get_next_shape_internal(root, id_frozen, SHAPE_FROZEN, &dont_care, true);
14001400
RUBY_ASSERT(rb_shape_id(special_const_shape) == SPECIAL_CONST_SHAPE_ID);
14011401
RUBY_ASSERT(SPECIAL_CONST_SHAPE_ID == (GET_SHAPE_TREE()->next_shape_id - 1));
14021402
RUBY_ASSERT(rb_shape_frozen_shape_p(special_const_shape));
@@ -1423,11 +1423,11 @@ Init_default_shapes(void)
14231423
// Prebuild TOO_COMPLEX variations so that they already exist if we ever need them after we
14241424
// ran out of shapes.
14251425
rb_shape_t *shape;
1426-
shape = get_next_shape_internal(too_complex_shape, (ID)id_frozen, SHAPE_FROZEN, &dont_care, true);
1427-
get_next_shape_internal(shape, (ID)internal_object_id, SHAPE_OBJ_ID, &dont_care, true);
1426+
shape = get_next_shape_internal(too_complex_shape, id_frozen, SHAPE_FROZEN, &dont_care, true);
1427+
get_next_shape_internal(shape, internal_object_id, SHAPE_OBJ_ID, &dont_care, true);
14281428

1429-
shape = get_next_shape_internal(too_complex_shape, (ID)internal_object_id, SHAPE_OBJ_ID, &dont_care, true);
1430-
get_next_shape_internal(shape, (ID)id_frozen, SHAPE_FROZEN, &dont_care, true);
1429+
shape = get_next_shape_internal(too_complex_shape, internal_object_id, SHAPE_OBJ_ID, &dont_care, true);
1430+
get_next_shape_internal(shape, id_frozen, SHAPE_FROZEN, &dont_care, true);
14311431
}
14321432

14331433
void

0 commit comments

Comments
 (0)