diff options
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh')
-rw-r--r-- | Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh index 98df3e7801c..33b7070ee08 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh @@ -51,7 +51,7 @@ struct postV2Tail { friend struct post; - inline bool sanitize (hb_sanitize_context_t *c) const + bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); return_trace (glyphNameIndex.sanitize (c)); @@ -71,9 +71,9 @@ struct postV2Tail struct post { - static const hb_tag_t tableTag = HB_OT_TAG_post; + enum { tableTag = HB_OT_TAG_post }; - inline bool subset (hb_subset_plan_t *plan) const + bool subset (hb_subset_plan_t *plan) const { unsigned int post_prime_length; hb_blob_t *post_blob = hb_sanitize_context_t ().reference_table<post>(plan->source); @@ -97,7 +97,7 @@ struct post struct accelerator_t { - inline void init (hb_face_t *face) + void init (hb_face_t *face) { index_to_offset.init (); @@ -107,7 +107,7 @@ struct post version = table->version.to_int (); if (version != 0x00020000) return; - const postV2Tail &v2 = table->v2; + const postV2Tail &v2 = table->v2X; glyphNameIndex = &v2.glyphNameIndex; pool = &StructAfter<uint8_t> (v2.glyphNameIndex); @@ -118,15 +118,15 @@ struct post data += 1 + *data) index_to_offset.push (data - pool); } - inline void fini (void) + void fini () { index_to_offset.fini (); free (gids_sorted_by_name.get ()); table.destroy (); } - inline bool get_glyph_name (hb_codepoint_t glyph, - char *buf, unsigned int buf_len) const + bool get_glyph_name (hb_codepoint_t glyph, + char *buf, unsigned int buf_len) const { hb_bytes_t s = find_glyph_name (glyph); if (!s.len) return false; @@ -137,8 +137,8 @@ struct post return true; } - inline bool get_glyph_from_name (const char *name, int len, - hb_codepoint_t *glyph) const + bool get_glyph_from_name (const char *name, int len, + hb_codepoint_t *glyph) const { unsigned int count = get_glyph_count (); if (unlikely (!count)) return false; @@ -168,7 +168,8 @@ struct post } hb_bytes_t st (name, len); - const uint16_t *gid = (const uint16_t *) hb_bsearch_r (&st, gids, count, sizeof (gids[0]), cmp_key, (void *) this); + const uint16_t *gid = (const uint16_t *) hb_bsearch_r (hb_addressof (st), gids, count, + sizeof (gids[0]), cmp_key, (void *) this); if (gid) { *glyph = *gid; @@ -180,7 +181,7 @@ struct post protected: - inline unsigned int get_glyph_count (void) const + unsigned int get_glyph_count () const { if (version == 0x00010000) return NUM_FORMAT1_NAMES; @@ -191,7 +192,7 @@ struct post return 0; } - static inline int cmp_gids (const void *pa, const void *pb, void *arg) + static int cmp_gids (const void *pa, const void *pb, void *arg) { const accelerator_t *thiz = (const accelerator_t *) arg; uint16_t a = * (const uint16_t *) pa; @@ -199,7 +200,7 @@ struct post return thiz->find_glyph_name (b).cmp (thiz->find_glyph_name (a)); } - static inline int cmp_key (const void *pk, const void *po, void *arg) + static int cmp_key (const void *pk, const void *po, void *arg) { const accelerator_t *thiz = (const accelerator_t *) arg; const hb_bytes_t *key = (const hb_bytes_t *) pk; @@ -207,7 +208,7 @@ struct post return thiz->find_glyph_name (o).cmp (*key); } - inline hb_bytes_t find_glyph_name (hb_codepoint_t glyph) const + hb_bytes_t find_glyph_name (hb_codepoint_t glyph) const { if (version == 0x00010000) { @@ -245,12 +246,12 @@ struct post hb_atomic_ptr_t<uint16_t *> gids_sorted_by_name; }; - inline bool sanitize (hb_sanitize_context_t *c) const + bool sanitize (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); return_trace (likely (c->check_struct (this) && (version.to_int () == 0x00010000 || - (version.to_int () == 0x00020000 && v2.sanitize (c)) || + (version.to_int () == 0x00020000 && v2X.sanitize (c)) || version.to_int () == 0x00030000))); } @@ -286,7 +287,7 @@ struct post * is downloaded as a Type 1 font. */ HBUINT32 maxMemType1; /* Maximum memory usage when an OpenType font * is downloaded as a Type 1 font. */ - postV2Tail v2; + postV2Tail v2X; DEFINE_SIZE_MIN (32); }; |