[arrays] Add as_array() to ArrayOf<>

This commit is contained in:
Behdad Esfahbod 2018-11-23 16:04:56 -05:00
parent 9552f4ef0d
commit c514f65181
1 changed files with 3 additions and 0 deletions

View File

@ -479,6 +479,9 @@ struct ArrayOf
inline unsigned int get_size (void) const
{ return len.static_size + len * Type::static_size; }
inline hb_array_t<Type> as_array (void) { return hb_array_t<Type> (arrayZ, len); }
inline hb_array_t<const Type> as_array (void) const { return hb_array_t<const Type> (arrayZ, len); }
inline bool serialize (hb_serialize_context_t *c,
unsigned int items_len)
{