Add sub_array to hb_vector_t

This commit is contained in:
Behdad Esfahbod 2018-12-06 10:21:06 -08:00
parent ca23b71935
commit f1352f7486
1 changed files with 18 additions and 0 deletions

View File

@ -98,11 +98,29 @@ struct hb_vector_t
inline hb_array_t<const Type> as_array (void) const inline hb_array_t<const Type> as_array (void) const
{ return hb_array (arrayZ(), len); } { return hb_array (arrayZ(), len); }
inline hb_array_t<const Type> sub_array (unsigned int start_offset, unsigned int count) const
{ return as_array ().sub_array (start_offset, count);}
inline hb_array_t<const Type> sub_array (unsigned int start_offset, unsigned int *count = nullptr /* IN/OUT */) const
{ return as_array ().sub_array (start_offset, count);}
inline hb_array_t<Type> sub_array (unsigned int start_offset, unsigned int count)
{ return as_array ().sub_array (start_offset, count);}
inline hb_array_t<Type> sub_array (unsigned int start_offset, unsigned int *count = nullptr /* IN/OUT */)
{ return as_array ().sub_array (start_offset, count);}
inline hb_sorted_array_t<Type> as_sorted_array (void) inline hb_sorted_array_t<Type> as_sorted_array (void)
{ return hb_sorted_array (arrayZ(), len); } { return hb_sorted_array (arrayZ(), len); }
inline hb_sorted_array_t<const Type> as_sorted_array (void) const inline hb_sorted_array_t<const Type> as_sorted_array (void) const
{ return hb_sorted_array (arrayZ(), len); } { return hb_sorted_array (arrayZ(), len); }
inline hb_array_t<const Type> sorted_sub_array (unsigned int start_offset, unsigned int count) const
{ return as_sorted_array ().sorted_sub_array (start_offset, count);}
inline hb_array_t<const Type> sorted_sub_array (unsigned int start_offset, unsigned int *count = nullptr /* IN/OUT */) const
{ return as_sorted_array ().sorted_sub_array (start_offset, count);}
inline hb_array_t<Type> sorted_sub_array (unsigned int start_offset, unsigned int count)
{ return as_sorted_array ().sorted_sub_array (start_offset, count);}
inline hb_array_t<Type> sorted_sub_array (unsigned int start_offset, unsigned int *count = nullptr /* IN/OUT */)
{ return as_sorted_array ().sorted_sub_array (start_offset, count);}
template <typename T> explicit_operator inline operator T * (void) { return arrayZ(); } template <typename T> explicit_operator inline operator T * (void) { return arrayZ(); }
template <typename T> explicit_operator inline operator const T * (void) const { return arrayZ(); } template <typename T> explicit_operator inline operator const T * (void) const { return arrayZ(); }
inline operator hb_array_t<Type> (void) { return as_array (); } inline operator hb_array_t<Type> (void) { return as_array (); }