This makes more of the gcc spurious warning:

../../src/hb-null.hh:53:39: warning: enum constant in boolean context [-Wint-in-bool-context]

But not going to let that defeat correct code.  Type to switch to clang
as my main compiler...
This commit is contained in:
Behdad Esfahbod 2018-11-22 01:49:12 -05:00
parent 2737aa81e5
commit b96ecb9971

View File

@ -60,7 +60,7 @@ struct hb_blob_t
template <typename Type>
inline const Type* as (void) const
{
return length < Type::min_size ? &Null(Type) : reinterpret_cast<const Type *> (data);
return length < hb_null_size<Type>::value ? &Null(Type) : reinterpret_cast<const Type *> (data);
}
inline hb_bytes_t as_bytes (void) const
{