From 40d71211a8969ec4414d2476a209e60d0a3525d3 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 21 Dec 2018 16:19:44 -0500 Subject: [PATCH] [iter] Add const_iter_t / const_iter() --- src/hb-iter.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hb-iter.hh b/src/hb-iter.hh index 48cc68738..1a1741264 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -45,6 +45,7 @@ template struct hb_iter_t { typedef Iter iter_t; + typedef iter_t const_iter_t; typedef Item item_t; /* https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern */ @@ -67,6 +68,7 @@ struct hb_iter_t /* Methods. */ iter_t iter () const { return *thiz(); } + const_iter_t const_iter () const { return iter (); } item_t& item () const { return thiz()->__item__ (); } item_t& item_at (unsigned i) const { return thiz()->__item_at__ (i); } bool more () const { return thiz()->__more__ (); }