From 5a5640d8506ccfc99fd119e89e829170d1fea421 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 14 Oct 2014 21:26:13 -0700 Subject: [PATCH] Move code around --- src/hb-open-type-private.hh | 50 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 9807569..a58e790 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -552,57 +552,57 @@ struct BEInt private: uint8_t v[2]; }; template -struct BEInt +struct BEInt { public: inline void set (Type V) { - v[0] = (V >> 24) & 0xFF; - v[1] = (V >> 16) & 0xFF; - v[2] = (V >> 8) & 0xFF; - v[3] = (V ) & 0xFF; + v[0] = (V >> 16) & 0xFF; + v[1] = (V >> 8) & 0xFF; + v[2] = (V ) & 0xFF; } inline operator Type (void) const { - return (v[0] << 24) - + (v[1] << 16) - + (v[2] << 8) - + (v[3] ); + return (v[0] << 16) + + (v[1] << 8) + + (v[2] ); } - inline bool operator == (const BEInt& o) const + 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]; + && v[2] == o.v[2]; } - inline bool operator != (const BEInt& o) const { return !(*this == o); } - private: uint8_t v[4]; + inline bool operator != (const BEInt& o) const { return !(*this == o); } + private: uint8_t v[3]; }; template -struct BEInt +struct BEInt { public: inline void set (Type V) { - v[0] = (V >> 16) & 0xFF; - v[1] = (V >> 8) & 0xFF; - v[2] = (V ) & 0xFF; + v[0] = (V >> 24) & 0xFF; + v[1] = (V >> 16) & 0xFF; + v[2] = (V >> 8) & 0xFF; + v[3] = (V ) & 0xFF; } inline operator Type (void) const { - return (v[0] << 16) - + (v[1] << 8) - + (v[2] ); + return (v[0] << 24) + + (v[1] << 16) + + (v[2] << 8) + + (v[3] ); } - inline bool operator == (const BEInt& o) const + inline bool operator == (const BEInt& o) const { return v[0] == o.v[0] && v[1] == o.v[1] - && v[2] == o.v[2]; + && v[2] == o.v[2] + && v[3] == o.v[3]; } - inline bool operator != (const BEInt& o) const { return !(*this == o); } - private: uint8_t v[3]; + inline bool operator != (const BEInt& o) const { return !(*this == o); } + private: uint8_t v[4]; }; /* Integer types in big-endian order and no alignment requirement */ -- 2.7.4