[iter] Use auto c = C.iter() internally

This commit is contained in:
Behdad Esfahbod 2019-01-28 16:17:36 -05:00
parent 073fa4ac5a
commit 8bd96be994
1 changed files with 2 additions and 2 deletions

View File

@ -79,10 +79,10 @@ struct hb_iter_t
iter_t& operator ++ () { thiz()->__next__ (); return *thiz(); }
iter_t& operator -= (unsigned count) { thiz()->__rewind__ (count); return *thiz(); }
iter_t& operator -- () { thiz()->__prev__ (); return *thiz(); }
iter_t operator + (unsigned count) const { iter_t c (*thiz()); c += count; return c; }
iter_t operator + (unsigned count) const { auto c = thiz()->iter (); c += count; return c; }
friend iter_t operator + (unsigned count, const iter_t &it) { return it + count; }
iter_t operator ++ (int) { iter_t c (*thiz()); ++*thiz(); return c; }
iter_t operator - (unsigned count) const { iter_t c (*thiz()); c -= count; return c; }
iter_t operator - (unsigned count) const { auto c = thiz()->iter (); c -= count; return c; }
iter_t operator -- (int) { iter_t c (*thiz()); --*thiz(); return c; }
protected: