Clean up GlyphID

After 4a27c17ea0 we do not need
the special GlyphID.cmp(hb_codepoint_t), so just make GlyphID
a typedef.

Fixes https://github.com/behdad/harfbuzz/issues/612
This commit is contained in:
Behdad Esfahbod 2017-11-13 20:25:02 -08:00
parent 7f39f57614
commit 83d6802736
1 changed files with 1 additions and 4 deletions

View File

@ -697,10 +697,7 @@ struct Tag : ULONG
DEFINE_NULL_DATA (Tag, " ");
/* Glyph index number, same as uint16 (length = 16 bits) */
struct GlyphID : USHORT {
static inline int cmp (const GlyphID *a, const GlyphID *b) { return b->USHORT::cmp (*a); }
inline int cmp (hb_codepoint_t a) const { return (int) a - (int) *this; }
};
typedef USHORT GlyphID;
/* Script/language-system/feature index */
struct Index : USHORT {