mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-23 16:01:07 +01:00
Comment
This commit is contained in:
1 parent
4a719a7f4c
commit
4e2a03b6b6
1 file changed
+3
-1
+3
-1
@@ -692,8 +692,10 @@ struct BEInt<Type, 2>
|
||||
inline operator Type (void) const
|
||||
{
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
/* Spoon-feed the compiler a big-endian integer with alignment 1.
|
||||
* https://github.com/harfbuzz/harfbuzz/pull/1398 */
|
||||
struct __attribute__((packed)) packed_uint16_t { uint16_t v; };
|
||||
return __builtin_bswap16(((packed_uint16_t *) this)->v);
|
||||
return __builtin_bswap16 (((packed_uint16_t *) this)->v);
|
||||
#endif
|
||||
return (v[0] << 8)
|
||||
+ (v[1] );
|
||||
|
||||
Reference in new issue
Block a user