[iter] Rename __item_type__ to __item_t__

This commit is contained in:
Behdad Esfahbod 2019-01-08 23:48:35 -08:00
parent 6caf76f4a8
commit 636786ecaf
5 changed files with 7 additions and 7 deletions

View File

@ -54,7 +54,7 @@ struct hb_array_t :
/*
* Iterator implementation.
*/
typedef Type& __item_type__;
typedef Type& __item_t__;
enum { is_random_access_iterator = true };
Type& __item_at__ (unsigned i) const
{

View File

@ -49,7 +49,7 @@
*/
/* Base class for all iterators. */
template <typename Iter, typename Item = typename Iter::__item_type__>
template <typename Iter, typename Item = typename Iter::__item_t__>
struct hb_iter_t
{
typedef Iter iter_t;
@ -113,7 +113,7 @@ struct hb_iter_t
static_assert (true, "")
/* Mixin to fill in what the subclass doesn't provide. */
template <typename iter_t, typename item_t = typename iter_t::__item_type__>
template <typename iter_t, typename item_t = typename iter_t::__item_t__>
struct hb_iter_mixin_t
{
private:

View File

@ -1153,8 +1153,8 @@ struct Coverage
default: break;
}
}
typedef const hb_pair_t<unsigned, hb_codepoint_t> __item_type__;
__item_type__ __item__ () const { return hb_pair (get_coverage (), get_glyph ()); }
typedef const hb_pair_t<unsigned, hb_codepoint_t> __item_t__;
__item_t__ __item__ () const { return hb_pair (get_coverage (), get_glyph ()); }
hb_codepoint_t get_glyph () const
{

View File

@ -679,7 +679,7 @@ struct hb_set_t
iter_t (const hb_set_t &s_ = Null(hb_set_t)) :
s (&s_), v (INVALID), l (s->get_population () + 1) { __next__ (); }
typedef hb_codepoint_t __item_type__;
typedef hb_codepoint_t __item_t__;
hb_codepoint_t __item__ () const { return v; }
bool __more__ () const { return v != INVALID; }
void __next__ () { s->next (&v); if (l) l--; }

View File

@ -39,7 +39,7 @@ struct array_iter_t :
{
array_iter_t (hb_array_t<T> arr_) : arr (arr_) {}
typedef T& __item_type__;
typedef T& __item_t__;
enum { is_random_access_iterator = true };
T& __item_at__ (unsigned i) const { return arr[i]; }
void __forward__ (unsigned n) { arr += n; }