[iter] Change from const_iter_t/iter_t to iter_t/writer_t

This commit is contained in:
Behdad Esfahbod 2019-01-09 00:32:11 -08:00
parent 7798e4fcc3
commit a4ea0d3680
2 changed files with 18 additions and 21 deletions

View File

@ -535,13 +535,12 @@ struct ArrayOf
hb_array_t<const Type> as_array () const { return hb_array (arrayZ, len); } hb_array_t<const Type> as_array () const { return hb_array (arrayZ, len); }
/* Iterator. */ /* Iterator. */
typedef hb_array_t<const Type> const_iter_t; typedef hb_array_t<const Type> iter_t;
typedef hb_array_t< Type> iter_t; typedef hb_array_t< Type> writer_t;
const_iter_t iter () const { return as_array (); } iter_t iter () const { return as_array (); }
const_iter_t citer () const { return as_array (); } writer_t writer () { return as_array (); }
iter_t iter () { return as_array (); } operator iter_t () const { return iter (); }
operator iter_t () { return iter (); } operator writer_t () { return writer (); }
operator const_iter_t () const { return iter (); }
hb_array_t<const Type> sub_array (unsigned int start_offset, unsigned int count) const hb_array_t<const Type> sub_array (unsigned int start_offset, unsigned int count) const
{ return as_array ().sub_array (start_offset, count);} { return as_array ().sub_array (start_offset, count);}
@ -810,13 +809,12 @@ struct SortedArrayOf : ArrayOf<Type, LenType>
hb_sorted_array_t<const Type> as_array () const { return hb_sorted_array (this->arrayZ, this->len); } hb_sorted_array_t<const Type> as_array () const { return hb_sorted_array (this->arrayZ, this->len); }
/* Iterator. */ /* Iterator. */
typedef hb_sorted_array_t<const Type> const_iter_t; typedef hb_sorted_array_t<const Type> iter_t;
typedef hb_sorted_array_t< Type> iter_t; typedef hb_sorted_array_t< Type> writer_t;
const_iter_t iter () const { return as_array (); } iter_t iter () const { return as_array (); }
const_iter_t citer () const { return as_array (); } writer_t writer () { return as_array (); }
iter_t iter () { return as_array (); } operator iter_t () const { return iter (); }
operator iter_t () { return iter (); } operator writer_t () { return writer (); }
operator const_iter_t () const { return iter (); }
hb_sorted_array_t<const Type> sub_array (unsigned int start_offset, unsigned int count) const hb_sorted_array_t<const Type> sub_array (unsigned int start_offset, unsigned int count) const
{ return as_array ().sub_array (start_offset, count);} { return as_array ().sub_array (start_offset, count);}

View File

@ -93,13 +93,12 @@ struct hb_vector_t
hb_array_t<const Type> as_array () const { return hb_array (arrayZ(), length); } hb_array_t<const Type> as_array () const { return hb_array (arrayZ(), length); }
/* Iterator. */ /* Iterator. */
typedef hb_array_t<const Type> const_iter_t; typedef hb_array_t<const Type> iter_t;
typedef hb_array_t< Type> iter_t; typedef hb_array_t< Type> writer_t;
const_iter_t iter () const { return as_array (); } iter_t iter () const { return as_array (); }
const_iter_t citer () const { return as_array (); } writer_t writer () { return as_array (); }
iter_t iter () { return as_array (); } operator iter_t () const { return iter (); }
operator iter_t () { return iter (); } operator writer_t () { return writer (); }
operator const_iter_t () const { return iter (); }
hb_array_t<const Type> sub_array (unsigned int start_offset, unsigned int count) const hb_array_t<const Type> sub_array (unsigned int start_offset, unsigned int count) const
{ return as_array ().sub_array (start_offset, count);} { return as_array ().sub_array (start_offset, count);}