diff --git a/src/hb-iter.hh b/src/hb-iter.hh index 1e1f0a68f..71a166740 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -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: