From f6d7a9bb4c19e605f1f16d9ca40adefba138c37e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 7 Jul 2011 16:20:35 -0400 Subject: [PATCH] Shuffle code around --- src/hb-ot-map-private.hh | 68 ++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/hb-ot-map-private.hh b/src/hb-ot-map-private.hh index 2b312614d..3ea43a022 100644 --- a/src/hb-ot-map-private.hh +++ b/src/hb-ot-map-private.hh @@ -38,40 +38,6 @@ HB_BEGIN_DECLS static const hb_tag_t table_tags[2] = {HB_OT_TAG_GSUB, HB_OT_TAG_GPOS}; -struct hb_ot_map_builder_t -{ - public: - - HB_INTERNAL void add_feature (hb_tag_t tag, unsigned int value, bool global); - - inline void add_bool_feature (hb_tag_t tag, bool global = true) - { add_feature (tag, 1, global); } - - HB_INTERNAL void compile (hb_face_t *face, - const hb_segment_properties_t *props, - struct hb_ot_map_t &m); - - inline void finish (void) { - feature_infos.finish (); - } - - private: - - struct feature_info_t { - hb_tag_t tag; - unsigned int seq; /* sequence#, used for stable sorting only */ - unsigned int max_value; - bool global; /* whether the feature applies value to every glyph in the buffer */ - unsigned int default_value; /* for non-global features, what should the unset glyphs take */ - - static int cmp (const feature_info_t *a, const feature_info_t *b) - { return (a->tag != b->tag) ? (a->tag < b->tag ? -1 : 1) : (a->seq < b->seq ? -1 : 1); } - }; - - hb_prealloced_array_t feature_infos; /* used before compile() only */ -}; - - struct hb_ot_map_t { friend struct hb_ot_map_builder_t; @@ -141,6 +107,40 @@ struct hb_ot_map_t }; +struct hb_ot_map_builder_t +{ + public: + + HB_INTERNAL void add_feature (hb_tag_t tag, unsigned int value, bool global); + + inline void add_bool_feature (hb_tag_t tag, bool global = true) + { add_feature (tag, 1, global); } + + HB_INTERNAL void compile (hb_face_t *face, + const hb_segment_properties_t *props, + struct hb_ot_map_t &m); + + inline void finish (void) { + feature_infos.finish (); + } + + private: + + struct feature_info_t { + hb_tag_t tag; + unsigned int seq; /* sequence#, used for stable sorting only */ + unsigned int max_value; + bool global; /* whether the feature applies value to every glyph in the buffer */ + unsigned int default_value; /* for non-global features, what should the unset glyphs take */ + + static int cmp (const feature_info_t *a, const feature_info_t *b) + { return (a->tag != b->tag) ? (a->tag < b->tag ? -1 : 1) : (a->seq < b->seq ? -1 : 1); } + }; + + hb_prealloced_array_t feature_infos; /* used before compile() only */ +}; + + HB_END_DECLS #endif /* HB_OT_MAP_PRIVATE_HH */