Use constructor/destructor for hb_ot_shape_plan_t
This commit is contained in:
parent
a5e4e10946
commit
e06d4eda7b
|
@ -52,7 +52,11 @@ struct hb_ot_shape_plan_t
|
||||||
hb_ot_map_t map;
|
hb_ot_map_t map;
|
||||||
hb_ot_complex_shaper_t shaper;
|
hb_ot_complex_shaper_t shaper;
|
||||||
|
|
||||||
inline void finish (void) { map.finish (); }
|
hb_ot_shape_plan_t (void) : map () {}
|
||||||
|
~hb_ot_shape_plan_t (void) { map.finish (); }
|
||||||
|
|
||||||
|
private:
|
||||||
|
NO_COPY (hb_ot_shape_plan_t);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -377,12 +377,10 @@ hb_ot_shape (hb_font_t *font,
|
||||||
const hb_feature_t *features,
|
const hb_feature_t *features,
|
||||||
unsigned int num_features)
|
unsigned int num_features)
|
||||||
{
|
{
|
||||||
hb_ot_shape_plan_t plan = hb_ot_shape_plan_t ();
|
hb_ot_shape_plan_t plan;
|
||||||
|
|
||||||
hb_ot_shape_plan_internal (&plan, font->face, &buffer->props, features, num_features);
|
hb_ot_shape_plan_internal (&plan, font->face, &buffer->props, features, num_features);
|
||||||
hb_ot_shape_execute (&plan, font, buffer, features, num_features);
|
hb_ot_shape_execute (&plan, font, buffer, features, num_features);
|
||||||
|
|
||||||
plan.finish ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue