[ot-shape] Pass reference to props instead of pointer
Since cannot be nullptr.
This commit is contained in:
parent
a972d05d7e
commit
d57ce30054
|
@ -52,9 +52,9 @@ struct hb_aat_map_builder_t
|
||||||
public:
|
public:
|
||||||
|
|
||||||
HB_INTERNAL hb_aat_map_builder_t (hb_face_t *face_,
|
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_),
|
face (face_),
|
||||||
props (*props_) {}
|
props (props_) {}
|
||||||
|
|
||||||
HB_INTERNAL void add_feature (hb_tag_t tag, unsigned int value=1);
|
HB_INTERNAL void add_feature (hb_tag_t tag, unsigned int value=1);
|
||||||
|
|
||||||
|
|
|
@ -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_,
|
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));
|
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 ();
|
stages[table_index].init ();
|
||||||
|
|
||||||
face = face_;
|
face = face_;
|
||||||
props = *props_;
|
props = props_;
|
||||||
|
|
||||||
/* Fetch script/language indices for GSUB/GPOS. We need these later to skip
|
/* 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. */
|
* features not available in either table and not waste precious bits for them. */
|
||||||
|
|
|
@ -204,7 +204,7 @@ struct hb_ot_map_builder_t
|
||||||
public:
|
public:
|
||||||
|
|
||||||
HB_INTERNAL hb_ot_map_builder_t (hb_face_t *face_,
|
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 ();
|
HB_INTERNAL ~hb_ot_map_builder_t ();
|
||||||
|
|
||||||
|
|
|
@ -53,11 +53,11 @@ _hb_codepoint_is_regional_indicator (hb_codepoint_t u)
|
||||||
|
|
||||||
#ifndef HB_NO_AAT_SHAPE
|
#ifndef HB_NO_AAT_SHAPE
|
||||||
static inline bool
|
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 */
|
/* https://github.com/harfbuzz/harfbuzz/issues/2124 */
|
||||||
return hb_aat_layout_has_substitution (face) &&
|
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
|
#endif
|
||||||
|
|
||||||
|
@ -77,9 +77,9 @@ hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner,
|
||||||
unsigned int num_user_features);
|
unsigned int num_user_features);
|
||||||
|
|
||||||
hb_ot_shape_planner_t::hb_ot_shape_planner_t (hb_face_t *face,
|
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),
|
face (face),
|
||||||
props (*props),
|
props (props),
|
||||||
map (face, props),
|
map (face, props),
|
||||||
aat_map (face, props)
|
aat_map (face, props)
|
||||||
#ifndef HB_NO_AAT_SHAPE
|
#ifndef HB_NO_AAT_SHAPE
|
||||||
|
@ -225,7 +225,7 @@ hb_ot_shape_plan_t::init0 (hb_face_t *face,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
hb_ot_shape_planner_t planner (face,
|
hb_ot_shape_planner_t planner (face,
|
||||||
&key->props);
|
key->props);
|
||||||
|
|
||||||
hb_ot_shape_collect_features (&planner,
|
hb_ot_shape_collect_features (&planner,
|
||||||
key->user_features,
|
key->user_features,
|
||||||
|
|
|
@ -161,7 +161,7 @@ struct hb_ot_shape_planner_t
|
||||||
const struct hb_ot_shaper_t *shaper;
|
const struct hb_ot_shaper_t *shaper;
|
||||||
|
|
||||||
HB_INTERNAL hb_ot_shape_planner_t (hb_face_t *face,
|
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,
|
HB_INTERNAL void compile (hb_ot_shape_plan_t &plan,
|
||||||
const hb_ot_shape_plan_key_t &key);
|
const hb_ot_shape_plan_key_t &key);
|
||||||
|
|
Loading…
Reference in New Issue