From: Behdad Esfahbod Date: Thu, 12 May 2011 02:18:31 +0000 (-0400) Subject: Use constructor/destructor for hb_ot_shape_plan_t X-Git-Tag: 2.0_alpha~7^2~196 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e06d4eda7bbdb3a1be1f1ce8d98b059a0730f14d;p=apps%2Fhome%2Fvideo-player.git Use constructor/destructor for hb_ot_shape_plan_t --- diff --git a/src/hb-ot-shape-private.hh b/src/hb-ot-shape-private.hh index b95815a..4ea73f5 100644 --- a/src/hb-ot-shape-private.hh +++ b/src/hb-ot-shape-private.hh @@ -52,7 +52,11 @@ struct hb_ot_shape_plan_t hb_ot_map_t map; 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); }; diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index aa5b920..71eae42 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -377,12 +377,10 @@ hb_ot_shape (hb_font_t *font, const hb_feature_t *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_execute (&plan, font, buffer, features, num_features); - - plan.finish (); }