From bbdd6fd21cc2e079defff7cb17c3eb8eff3f9e09 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 19 Feb 2015 17:03:02 +0300 Subject: [PATCH] Minor simpilfy BEInt --- src/hb-open-type-private.hh | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 3c2c63187..2572b3e99 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -549,12 +549,6 @@ struct BEInt return (v[0] << 8) + (v[1] ); } - inline bool operator == (const BEInt& o) const - { - return v[0] == o.v[0] - && v[1] == o.v[1]; - } - inline bool operator != (const BEInt& o) const { return !(*this == o); } private: uint8_t v[2]; }; template @@ -573,13 +567,6 @@ struct BEInt + (v[1] << 8) + (v[2] ); } - inline bool operator == (const BEInt& o) const - { - return v[0] == o.v[0] - && v[1] == o.v[1] - && v[2] == o.v[2]; - } - inline bool operator != (const BEInt& o) const { return !(*this == o); } private: uint8_t v[3]; }; template @@ -600,14 +587,6 @@ struct BEInt + (v[2] << 8) + (v[3] ); } - inline bool operator == (const BEInt& o) const - { - return v[0] == o.v[0] - && v[1] == o.v[1] - && v[2] == o.v[2] - && v[3] == o.v[3]; - } - inline bool operator != (const BEInt& o) const { return !(*this == o); } private: uint8_t v[4]; }; @@ -617,8 +596,8 @@ struct IntType { inline void set (Type i) { v.set (i); } inline operator Type(void) const { return v; } - inline bool operator == (const IntType &o) const { return v == o.v; } - inline bool operator != (const IntType &o) const { return v != o.v; } + inline bool operator == (const IntType &o) const { return (Type) v == (Type) o.v; } + inline bool operator != (const IntType &o) const { return !(*this == o); } static inline int cmp (const IntType *a, const IntType *b) { return b->cmp (*a); } inline int cmp (IntType va) const { Type a = va; return cmp (va); } inline int cmp (Type a) const