[iter] Remove const_iter
This commit is contained in:
parent
d12b80c05a
commit
6dc4a1c9b1
|
@ -47,7 +47,6 @@ template <typename Iter, typename Item = typename Iter::__item_type__>
|
||||||
struct hb_iter_t
|
struct hb_iter_t
|
||||||
{
|
{
|
||||||
typedef Iter iter_t;
|
typedef Iter iter_t;
|
||||||
typedef iter_t const_iter_t;
|
|
||||||
typedef Item item_t;
|
typedef Item item_t;
|
||||||
enum { item_size = hb_static_size (Item) };
|
enum { item_size = hb_static_size (Item) };
|
||||||
|
|
||||||
|
@ -74,7 +73,6 @@ struct hb_iter_t
|
||||||
|
|
||||||
/* Methods. */
|
/* Methods. */
|
||||||
iter_t iter () const { return *thiz(); }
|
iter_t iter () const { return *thiz(); }
|
||||||
const_iter_t const_iter () const { return iter (); }
|
|
||||||
item_t& item () const { return thiz()->__item__ (); }
|
item_t& item () const { return thiz()->__item__ (); }
|
||||||
item_t& item_at (unsigned i) const { return thiz()->__item_at__ (i); }
|
item_t& item_at (unsigned i) const { return thiz()->__item_at__ (i); }
|
||||||
bool more () const { return thiz()->__more__ (); }
|
bool more () const { return thiz()->__more__ (); }
|
||||||
|
|
|
@ -671,11 +671,11 @@ struct hb_set_t
|
||||||
/*
|
/*
|
||||||
* Iterator implementation.
|
* Iterator implementation.
|
||||||
*/
|
*/
|
||||||
struct const_iter_t :
|
struct iter_t :
|
||||||
hb_sorted_iter_t<const_iter_t, const hb_codepoint_t>,
|
hb_sorted_iter_t<iter_t, const hb_codepoint_t>,
|
||||||
hb_iter_mixin_t<const_iter_t, const hb_codepoint_t>
|
hb_iter_mixin_t<iter_t, const hb_codepoint_t>
|
||||||
{
|
{
|
||||||
const_iter_t (const hb_set_t &s_ = Null(hb_set_t)) :
|
iter_t (const hb_set_t &s_ = Null(hb_set_t)) :
|
||||||
s (&s_), v (INVALID), l (s->get_population () + 1) { __next__ (); }
|
s (&s_), v (INVALID), l (s->get_population () + 1) { __next__ (); }
|
||||||
|
|
||||||
typedef hb_codepoint_t __item_type__;
|
typedef hb_codepoint_t __item_type__;
|
||||||
|
@ -690,10 +690,8 @@ struct hb_set_t
|
||||||
hb_codepoint_t v;
|
hb_codepoint_t v;
|
||||||
unsigned l;
|
unsigned l;
|
||||||
};
|
};
|
||||||
const_iter_t const_iter () const { return const_iter_t (*this); }
|
iter_t iter () const { return iter_t (*this); }
|
||||||
operator const_iter_t () const { return const_iter (); }
|
operator iter_t () const { return iter (); }
|
||||||
typedef const_iter_t iter_t;
|
|
||||||
iter_t iter () const { return const_iter (); }
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
|
@ -95,12 +95,12 @@ struct hb_vector_t
|
||||||
{ return hb_array (arrayZ(), length); }
|
{ return hb_array (arrayZ(), length); }
|
||||||
|
|
||||||
/* Iterator. */
|
/* Iterator. */
|
||||||
typedef hb_array_t<const Type> const_iter_t;
|
|
||||||
const_iter_t const_iter () const { return as_array (); }
|
|
||||||
operator const_iter_t () const { return const_iter (); }
|
|
||||||
typedef hb_array_t<Type> iter_t;
|
typedef hb_array_t<Type> iter_t;
|
||||||
iter_t iter () { return as_array (); }
|
iter_t iter () { return as_array (); }
|
||||||
operator iter_t () { return iter (); }
|
operator iter_t () { return iter (); }
|
||||||
|
typedef hb_array_t<const Type> const_iter_t;
|
||||||
|
const_iter_t citer () const { return as_array (); }
|
||||||
|
operator const_iter_t () const { return citer (); }
|
||||||
|
|
||||||
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);}
|
||||||
|
|
Loading…
Reference in New Issue