[iter] Fix zip iterator sortedness classification logic

This commit is contained in:
Behdad Esfahbod 2019-05-13 17:25:07 -07:00
parent c572732f29
commit 4d3cf2adb6
1 changed files with 2 additions and 7 deletions

View File

@ -521,13 +521,8 @@ struct hb_zip_iter_t :
A::is_random_access_iterator &&
B::is_random_access_iterator;
static constexpr hb_sortedness_t is_sorted_iterator =
(A::is_sorted_iterator == hb_sortedness_t::NOT_SORTED ||
B::is_sorted_iterator == hb_sortedness_t::NOT_SORTED) ?
hb_sortedness_t::NOT_SORTED :
(A::is_sorted_iterator == hb_sortedness_t::STRICTLY_SORTED ||
B::is_sorted_iterator == hb_sortedness_t::STRICTLY_SORTED) ?
hb_sortedness_t::STRICTLY_SORTED :
hb_sortedness_t::SORTED;
A::is_sorted_iterator == hb_sortedness_t::SORTED ?
B::is_sorted_iterator : A::is_sorted_iterator;
__item_t__ __item__ () const { return __item_t__ (*a, *b); }
__item_t__ __item_at__ (unsigned i) const { return __item_t__ (a[i], b[i]); }