@ -100,6 +100,8 @@ struct BEInt<Type, 2>
BEInt ( ) = default ;
BEInt ( ) = default ;
constexpr BEInt ( Type V ) : v { uint8_t ( ( V > > 8 ) & 0xFF ) ,
constexpr BEInt ( Type V ) : v { uint8_t ( ( V > > 8 ) & 0xFF ) ,
uint8_t ( ( V ) & 0xFF ) } { }
uint8_t ( ( V ) & 0xFF ) } { }
struct __attribute__ ( ( packed ) ) packed_uint16_t { uint16_t v ; } ;
constexpr operator Type ( ) const
constexpr operator Type ( ) const
{
{
# if ((defined(__GNUC__) && __GNUC__ >= 5) || defined(__clang__)) && \
# if ((defined(__GNUC__) && __GNUC__ >= 5) || defined(__clang__)) && \
@ -107,7 +109,6 @@ struct BEInt<Type, 2>
( __BYTE_ORDER = = __LITTLE_ENDIAN | | __BYTE_ORDER = = __BIG_ENDIAN )
( __BYTE_ORDER = = __LITTLE_ENDIAN | | __BYTE_ORDER = = __BIG_ENDIAN )
/* Spoon-feed the compiler a big-endian integer with alignment 1.
/* Spoon-feed the compiler a big-endian integer with alignment 1.
* https : //github.com/harfbuzz/harfbuzz/pull/1398 */
* https : //github.com/harfbuzz/harfbuzz/pull/1398 */
struct __attribute__ ( ( packed ) ) packed_uint16_t { uint16_t v ; } ;
# if __BYTE_ORDER == __LITTLE_ENDIAN
# if __BYTE_ORDER == __LITTLE_ENDIAN
return __builtin_bswap16 ( ( ( packed_uint16_t * ) this ) - > v ) ;
return __builtin_bswap16 ( ( ( packed_uint16_t * ) this ) - > v ) ;
# else /* __BYTE_ORDER == __BIG_ENDIAN */
# else /* __BYTE_ORDER == __BIG_ENDIAN */