From 0299b45000b5047c0b9bf0fe51f3b8b68a7982f8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 21 Aug 2015 12:44:36 +0100 Subject: [PATCH] Make BYTE a real type --- src/hb-open-type-private.hh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 75a0f568d..294889a83 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -535,6 +535,20 @@ struct Supplier template struct BEInt; +template +struct BEInt +{ + public: + inline void set (Type V) + { + v = V; + } + inline operator Type (void) const + { + return v; + } + private: uint8_t v; +}; template struct BEInt { @@ -618,7 +632,7 @@ struct IntType DEFINE_SIZE_STATIC (Size); }; -typedef uint8_t BYTE; /* 8-bit unsigned integer. */ +typedef IntType BYTE; /* 8-bit unsigned integer. */ typedef IntType USHORT; /* 16-bit unsigned integer. */ typedef IntType SHORT; /* 16-bit signed integer. */ typedef IntType ULONG; /* 32-bit unsigned integer. */