[iter] Rename hb_is_[sorted_]iterator() -> hb_is_[sorted_]iterator_of()
This commit is contained in:
parent
a6c013b1bf
commit
445364d80a
|
@ -162,7 +162,7 @@ struct hb_is_iterable { enum { value = _hb_is_iterable<T, hb_true_t>::value }; }
|
|||
/* hb_is_iterator() / hb_is_sorted_iterator() */
|
||||
|
||||
template <typename Iter>
|
||||
struct _hb_is_iterator
|
||||
struct _hb_is_iterator_of
|
||||
{
|
||||
char operator () (...) { return 0; };
|
||||
template<typename Item> int operator () (hb_iter_t<Iter, Item> *) { return 0; };
|
||||
|
@ -172,13 +172,16 @@ struct _hb_is_iterator
|
|||
static_assert (sizeof (char) != sizeof (int), "");
|
||||
};
|
||||
template<typename Iter, typename Item>
|
||||
struct hb_is_iterator { enum {
|
||||
value = sizeof (int) == sizeof (hb_declval (_hb_is_iterator<Iter>) (hb_declval (Iter*))) }; };
|
||||
#define hb_is_iterator(Iter, Item) hb_is_iterator<Iter, Item>::value
|
||||
struct hb_is_iterator_of { enum {
|
||||
value = sizeof (int) == sizeof (hb_declval (_hb_is_iterator_of<Iter>) (hb_declval (Iter*))) }; };
|
||||
#define hb_is_iterator_of(Iter, Item) hb_is_iterator_of<Iter, Item>::value
|
||||
#define hb_is_iterator(Iter) hb_is_iterator_of (Iter, typename Iter::item_t)
|
||||
|
||||
#define hb_is_sorted_iterator(Iter, Item) \
|
||||
hb_is_iterator (Iter, Item) && \
|
||||
#define hb_is_sorted_iterator_of(Iter, Item) \
|
||||
hb_is_iterator_of (Iter, Item) && \
|
||||
Iter::is_sorted_iterator
|
||||
#define hb_is_sorted_iterator(Iter) \
|
||||
hb_is_sorted_iterator_of (Iter, typename Iter::item_t)
|
||||
|
||||
/*
|
||||
* Algorithms operating on iterators or iteratables.
|
||||
|
|
|
@ -554,7 +554,7 @@ struct ArrayOf
|
|||
return_trace (true);
|
||||
}
|
||||
template <typename Iterator>
|
||||
hb_enable_if_t (hb_is_iterator (Iterator, const Type),
|
||||
hb_enable_if_t (hb_is_iterator_of (Iterator, const Type),
|
||||
bool) serialize (hb_serialize_context_t *c,
|
||||
Iterator items)
|
||||
{
|
||||
|
@ -822,7 +822,7 @@ struct SortedArrayOf : ArrayOf<Type, LenType>
|
|||
return_trace (ret);
|
||||
}
|
||||
template <typename Iterator>
|
||||
hb_enable_if_t (hb_is_sorted_iterator (Iterator, const Type),
|
||||
hb_enable_if_t (hb_is_sorted_iterator_of (Iterator, const Type),
|
||||
bool) serialize (hb_serialize_context_t *c,
|
||||
Iterator items)
|
||||
{
|
||||
|
|
|
@ -827,7 +827,7 @@ struct CoverageFormat1
|
|||
}
|
||||
|
||||
template <typename Iterator>
|
||||
hb_enable_if_t (hb_is_sorted_iterator (Iterator, const GlyphID),
|
||||
hb_enable_if_t (hb_is_sorted_iterator_of (Iterator, const GlyphID),
|
||||
bool) serialize (hb_serialize_context_t *c,
|
||||
Iterator glyphs)
|
||||
{
|
||||
|
@ -896,7 +896,7 @@ struct CoverageFormat2
|
|||
}
|
||||
|
||||
template <typename Iterator>
|
||||
hb_enable_if_t (hb_is_sorted_iterator (Iterator, const GlyphID),
|
||||
hb_enable_if_t (hb_is_sorted_iterator_of (Iterator, const GlyphID),
|
||||
bool) serialize (hb_serialize_context_t *c,
|
||||
Iterator glyphs)
|
||||
{
|
||||
|
@ -1047,7 +1047,7 @@ struct Coverage
|
|||
}
|
||||
|
||||
template <typename Iterator>
|
||||
hb_enable_if_t (hb_is_sorted_iterator (Iterator, const GlyphID),
|
||||
hb_enable_if_t (hb_is_sorted_iterator_of (Iterator, const GlyphID),
|
||||
bool) serialize (hb_serialize_context_t *c,
|
||||
Iterator glyphs)
|
||||
{
|
||||
|
|
|
@ -66,7 +66,7 @@ struct some_array_t
|
|||
|
||||
|
||||
template <typename Iter> static
|
||||
hb_enable_if_t (hb_is_iterator (Iter, typename Iter::item_t),
|
||||
hb_enable_if_t (hb_is_iterator (Iter),
|
||||
void)
|
||||
test_iterator (Iter it)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue