提交 50e5750b 编写于 作者: B Behdad Esfahbod

Avoid unnecessary cast to 64-bit

Fixes https://github.com/behdad/harfbuzz/issues/146

Or I think it should.
上级 305d2fbf
...@@ -242,7 +242,7 @@ static inline unsigned int ARRAY_LENGTH (const Type (&)[n]) { return n; } ...@@ -242,7 +242,7 @@ static inline unsigned int ARRAY_LENGTH (const Type (&)[n]) { return n; }
/* Note: C++ allows sizeof() of variable-lengh arrays. So, if _cond is not /* Note: C++ allows sizeof() of variable-lengh arrays. So, if _cond is not
* constant, it still compiles (ouch!), but at least we'll get a -Wvla warning. */ * constant, it still compiles (ouch!), but at least we'll get a -Wvla warning. */
#define ASSERT_STATIC_EXPR_ZERO(_cond) (0 * sizeof (char[(_cond) ? 1 : -1])) #define ASSERT_STATIC_EXPR_ZERO(_cond) (0 * (unsigned int) sizeof (char[(_cond) ? 1 : -1]))
#define _PASTE1(a,b) a##b #define _PASTE1(a,b) a##b
#define PASTE(a,b) _PASTE1(a,b) #define PASTE(a,b) _PASTE1(a,b)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册