From 83d68027360ff655d3b59371fb606fc9e40df4ac Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 13 Nov 2017 20:25:02 -0800 Subject: [PATCH] Clean up GlyphID 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 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 2687ba664..de5e9917f 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -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 {