diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2018-11-11 00:15:08 -0500 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2018-11-11 00:15:08 -0500 |
commit | 109891d49876de4de14a91adefbdf681c2b9acc2 (patch) | |
tree | 07f13e8ee701f1ff5191e5872a497ddbeee4e008 | |
parent | 34185ff3bc7ece5620145fc05da07c79da950f34 (diff) |
[shape-plan] Make null object all zeros
To remove custom null object next..
-rw-r--r-- | src/hb-shape-plan.cc | 8 | ||||
-rw-r--r-- | src/hb-shape-plan.hh | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/hb-shape-plan.cc b/src/hb-shape-plan.cc index f2f21019..644c1b6b 100644 --- a/src/hb-shape-plan.cc +++ b/src/hb-shape-plan.cc @@ -107,8 +107,8 @@ DEFINE_NULL_INSTANCE (hb_shape_plan_t) = { HB_OBJECT_HEADER_STATIC, - true, /* default_shaper_list */ nullptr, /* face */ + false, /* custom_shaper_list */ HB_SEGMENT_PROPERTIES_DEFAULT, /* props */ nullptr, /* shaper_func */ @@ -196,7 +196,7 @@ hb_shape_plan_create2 (hb_face_t *face, assert (props->direction != HB_DIRECTION_INVALID); hb_face_make_immutable (face); - shape_plan->default_shaper_list = !shaper_list; + shape_plan->custom_shaper_list = shaper_list; shape_plan->face_unsafe = face; shape_plan->props = *props; shape_plan->num_user_features = num_user_features; @@ -382,7 +382,7 @@ static unsigned int hb_shape_plan_hash (const hb_shape_plan_t *shape_plan) { return hb_segment_properties_hash (&shape_plan->props) + - shape_plan->default_shaper_list ? 0 : (intptr_t) shape_plan->shaper_func; + shape_plan->custom_shaper_list ? (intptr_t) shape_plan->shaper_func : 0; } #endif @@ -436,7 +436,7 @@ hb_shape_plan_matches (const hb_shape_plan_t *shape_plan, return hb_segment_properties_equal (&shape_plan->props, &proposal->props) && hb_shape_plan_user_features_match (shape_plan, proposal) && hb_shape_plan_coords_match (shape_plan, proposal) && - ((shape_plan->default_shaper_list && !proposal->shaper_list) || + ((!shape_plan->custom_shaper_list && !proposal->shaper_list) || (shape_plan->shaper_func == proposal->shaper_func)); } diff --git a/src/hb-shape-plan.hh b/src/hb-shape-plan.hh index 403c3ebd..fea3e10c 100644 --- a/src/hb-shape-plan.hh +++ b/src/hb-shape-plan.hh @@ -35,8 +35,8 @@ struct hb_shape_plan_t { hb_object_header_t header; - hb_bool_t default_shaper_list; hb_face_t *face_unsafe; /* We don't carry a reference to face. */ + bool custom_shaper_list; hb_segment_properties_t props; hb_shape_func_t *shaper_func; |