diff --git a/src/hb-aat-map.hh b/src/hb-aat-map.hh index 976a2cda2..c914f58d7 100644 --- a/src/hb-aat-map.hh +++ b/src/hb-aat-map.hh @@ -52,9 +52,9 @@ struct hb_aat_map_builder_t public: HB_INTERNAL hb_aat_map_builder_t (hb_face_t *face_, - const hb_segment_properties_t *props_) : + const hb_segment_properties_t props_) : face (face_), - props (*props_) {} + props (props_) {} HB_INTERNAL void add_feature (hb_tag_t tag, unsigned int value=1); diff --git a/src/hb-ot-map.cc b/src/hb-ot-map.cc index 5e7ffae83..39215b335 100644 --- a/src/hb-ot-map.cc +++ b/src/hb-ot-map.cc @@ -43,7 +43,7 @@ void hb_ot_map_t::collect_lookups (unsigned int table_index, hb_set_t *lookups_o hb_ot_map_builder_t::hb_ot_map_builder_t (hb_face_t *face_, - const hb_segment_properties_t *props_) + const hb_segment_properties_t &props_) { memset (this, 0, sizeof (*this)); @@ -52,7 +52,7 @@ hb_ot_map_builder_t::hb_ot_map_builder_t (hb_face_t *face_, stages[table_index].init (); face = face_; - props = *props_; + props = props_; /* Fetch script/language indices for GSUB/GPOS. We need these later to skip * features not available in either table and not waste precious bits for them. */ diff --git a/src/hb-ot-map.hh b/src/hb-ot-map.hh index 66c5c991d..917e911af 100644 --- a/src/hb-ot-map.hh +++ b/src/hb-ot-map.hh @@ -204,7 +204,7 @@ struct hb_ot_map_builder_t public: HB_INTERNAL hb_ot_map_builder_t (hb_face_t *face_, - const hb_segment_properties_t *props_); + const hb_segment_properties_t &props_); HB_INTERNAL ~hb_ot_map_builder_t (); diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 0806abb7d..2ada84b8a 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -53,11 +53,11 @@ _hb_codepoint_is_regional_indicator (hb_codepoint_t u) #ifndef HB_NO_AAT_SHAPE static inline bool -_hb_apply_morx (hb_face_t *face, const hb_segment_properties_t *props) +_hb_apply_morx (hb_face_t *face, const hb_segment_properties_t &props) { /* https://github.com/harfbuzz/harfbuzz/issues/2124 */ return hb_aat_layout_has_substitution (face) && - (HB_DIRECTION_IS_HORIZONTAL (props->direction) || !hb_ot_layout_has_substitution (face)); + (HB_DIRECTION_IS_HORIZONTAL (props.direction) || !hb_ot_layout_has_substitution (face)); } #endif @@ -77,9 +77,9 @@ hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner, unsigned int num_user_features); hb_ot_shape_planner_t::hb_ot_shape_planner_t (hb_face_t *face, - const hb_segment_properties_t *props) : + const hb_segment_properties_t &props) : face (face), - props (*props), + props (props), map (face, props), aat_map (face, props) #ifndef HB_NO_AAT_SHAPE @@ -225,7 +225,7 @@ hb_ot_shape_plan_t::init0 (hb_face_t *face, #endif hb_ot_shape_planner_t planner (face, - &key->props); + key->props); hb_ot_shape_collect_features (&planner, key->user_features, diff --git a/src/hb-ot-shape.hh b/src/hb-ot-shape.hh index 17fa58b33..de0826ffa 100644 --- a/src/hb-ot-shape.hh +++ b/src/hb-ot-shape.hh @@ -161,7 +161,7 @@ struct hb_ot_shape_planner_t const struct hb_ot_shaper_t *shaper; HB_INTERNAL hb_ot_shape_planner_t (hb_face_t *face, - const hb_segment_properties_t *props); + const hb_segment_properties_t &props); HB_INTERNAL void compile (hb_ot_shape_plan_t &plan, const hb_ot_shape_plan_key_t &key);