diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2015-08-21 12:44:36 +0100 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2015-08-21 12:44:36 +0100 |
commit | 0299b45000b5047c0b9bf0fe51f3b8b68a7982f8 (patch) | |
tree | 8ffc49b32ae29bd8615c526f6f702a4c479348a4 | |
parent | ed6962c795ae7c54aaee9ed5667fa65ccf7412bf (diff) | |
download | harfbuzz-0299b45000b5047c0b9bf0fe51f3b8b68a7982f8.tar.gz |
Make BYTE a real type
-rw-r--r-- | src/hb-open-type-private.hh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 75a0f568..294889a8 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -536,6 +536,20 @@ struct Supplier template <typename Type, int Bytes> struct BEInt; template <typename Type> +struct BEInt<Type, 1> +{ + public: + inline void set (Type V) + { + v = V; + } + inline operator Type (void) const + { + return v; + } + private: uint8_t v; +}; +template <typename Type> struct BEInt<Type, 2> { public: @@ -618,7 +632,7 @@ struct IntType DEFINE_SIZE_STATIC (Size); }; -typedef uint8_t BYTE; /* 8-bit unsigned integer. */ +typedef IntType<uint8_t , 1> BYTE; /* 8-bit unsigned integer. */ typedef IntType<uint16_t, 2> USHORT; /* 16-bit unsigned integer. */ typedef IntType<int16_t, 2> SHORT; /* 16-bit signed integer. */ typedef IntType<uint32_t, 4> ULONG; /* 32-bit unsigned integer. */ |