diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 9807569ca..a58e790e0 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -552,6 +552,31 @@ struct BEInt private: uint8_t v[2]; }; template +struct BEInt +{ + public: + inline void set (Type V) + { + v[0] = (V >> 16) & 0xFF; + v[1] = (V >> 8) & 0xFF; + v[2] = (V ) & 0xFF; + } + inline operator Type (void) const + { + return (v[0] << 16) + + (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 struct BEInt { public: @@ -579,31 +604,6 @@ struct BEInt inline bool operator != (const BEInt& o) const { return !(*this == o); } private: uint8_t v[4]; }; -template -struct BEInt -{ - public: - inline void set (Type V) - { - v[0] = (V >> 16) & 0xFF; - v[1] = (V >> 8) & 0xFF; - v[2] = (V ) & 0xFF; - } - inline operator Type (void) const - { - return (v[0] << 16) - + (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]; -}; /* Integer types in big-endian order and no alignment requirement */ template