From 7ee1cacb84e6b19908ac0e692601447597d40605 Mon Sep 17 00:00:00 2001 From: Jemma Issroff Date: Thu, 10 Nov 2022 11:36:24 -0500 Subject: Extract `rb_shape_get_parent` helper Extract an `rb_shape_get_parent` method instead of continually calling `rb_shape_get_shape_by_id(shape->parent_id)` --- shape.h | 1 + 1 file changed, 1 insertion(+) (limited to 'shape.h') diff --git a/shape.h b/shape.h index a7450cdeea..417a013697 100644 --- a/shape.h +++ b/shape.h @@ -133,6 +133,7 @@ bool rb_shape_root_shape_p(rb_shape_t* shape); rb_shape_t * rb_shape_get_root_shape(void); rb_shape_t* rb_shape_get_shape_by_id_without_assertion(shape_id_t shape_id); +rb_shape_t * rb_shape_get_parent(rb_shape_t * shape); MJIT_SYMBOL_EXPORT_BEGIN rb_shape_t* rb_shape_get_shape_by_id(shape_id_t shape_id); -- cgit v1.2.3