[HarfBuzz] harfbuzz: Branch 'master'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Sat Dec 1 05:03:47 UTC 2018
src/hb-open-type.hh | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit eb5ddd32bf4e458ca0af8d5784f8fd46485ad225
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat Dec 1 00:03:01 2018 -0500
Change BigEndian casts to be int-sized
Fixes spurious warnings like:
Fixes https://github.com/harfbuzz/harfbuzz/issues/1436
diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh
index ee76d7ed..99a1c9b9 100644
--- a/src/hb-open-type.hh
+++ b/src/hb-open-type.hh
@@ -66,7 +66,7 @@ struct IntType
inline int cmp (Type2 a) const
{
Type b = v;
- if (sizeof (Type) < sizeof (int) && sizeof (Type2) < sizeof (int))
+ if (Size < sizeof (int) && sizeof (Type2) < sizeof (int))
return (int) a - (int) b;
else
return a < b ? -1 : a == b ? 0 : +1;
@@ -82,13 +82,13 @@ struct IntType
DEFINE_SIZE_STATIC (Size);
};
-typedef IntType<uint8_t, 1> HBUINT8; /* 8-bit unsigned integer. */
-typedef IntType<int8_t, 1> HBINT8; /* 8-bit signed integer. */
-typedef IntType<uint16_t, 2> HBUINT16; /* 16-bit unsigned integer. */
-typedef IntType<int16_t, 2> HBINT16; /* 16-bit signed integer. */
-typedef IntType<uint32_t, 4> HBUINT32; /* 32-bit unsigned integer. */
-typedef IntType<int32_t, 4> HBINT32; /* 32-bit signed integer. */
-typedef IntType<uint32_t, 3> HBUINT24; /* 24-bit unsigned integer. */
+typedef IntType<unsigned, 1> HBUINT8; /* 8-bit unsigned integer. */
+typedef IntType< signed, 1> HBINT8; /* 8-bit signed integer. */
+typedef IntType<unsigned, 2> HBUINT16; /* 16-bit unsigned integer. */
+typedef IntType< signed, 2> HBINT16; /* 16-bit signed integer. */
+typedef IntType<unsigned, 3> HBUINT24; /* 24-bit unsigned integer. */
+typedef IntType<unsigned, 4> HBUINT32; /* 32-bit unsigned integer. */
+typedef IntType< signed, 4> HBINT32; /* 32-bit signed integer. */
/* 16-bit signed integer (HBINT16) that describes a quantity in FUnits. */
typedef HBINT16 FWORD;
More information about the HarfBuzz
mailing list