Add trivial casts to hb_bytes_t

This commit is contained in:
Behdad Esfahbod 2018-11-10 16:09:21 -05:00
parent 8bb97d2ce1
commit 6213a75b68

View File

@ -526,6 +526,9 @@ struct hb_bytes_t
template <typename T>
inline hb_bytes_t (const T& array) : arrayZ ((const char *) array.arrayZ), len (array.len) {}
inline operator const void * (void) const { return arrayZ; }
inline operator const char * (void) const { return arrayZ; }
inline void free (void) { ::free ((void *) arrayZ); arrayZ = nullptr; len = 0; }
inline int cmp (const hb_bytes_t &a) const