Clean up GlyphID
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 14 Nov 2017 04:25:02 +0000 (20:25 -0800)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 14 Nov 2017 04:25:02 +0000 (20:25 -0800)
After 4a27c17ea0234dfe33e62f5830d9f92c26d48d30 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

src/hb-open-type-private.hh

index 2687ba664fa17aa2011adcb3356165a58bdae90e..de5e9917f3ae92f137cd99e910fa898e1156a536 100644 (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 {