提交 420d8ac3 编写于 作者: B Behdad Esfahbod

[algs] Add hb_iter()

Makes it nicer in pipelines.
上级 54ec48ea
......@@ -31,6 +31,10 @@
#include "hb-null.hh"
template <typename T>
inline typename T::iter_t
hb_iter (const T& c) { return c.iter (); }
static HB_UNUSED struct hb_identity_t
{
template <typename T> T
......
......@@ -46,7 +46,7 @@ struct SingleSubstFormat1
void closure (hb_closure_context_t *c) const
{
for (auto it = (this+coverage).iter ()
for (auto it = hb_iter (this+coverage)
| hb_filter (*c->glyphs); it; ++it)
c->output->add ((*it + deltaGlyphID) & 0xFFFFu);
}
......@@ -54,7 +54,7 @@ struct SingleSubstFormat1
void collect_glyphs (hb_collect_glyphs_context_t *c) const
{
if (unlikely (!(this+coverage).add_coverage (c->input))) return;
for (auto it = (this+coverage).iter (); it; ++it)
for (auto it = hb_iter (this+coverage); it; ++it)
c->output->add ((*it + deltaGlyphID) & 0xFFFFu);
}
......@@ -100,7 +100,7 @@ struct SingleSubstFormat1
hb_sorted_vector_t<GlyphID> from;
hb_vector_t<GlyphID> to;
hb_codepoint_t delta = deltaGlyphID;
for (auto it = (this+coverage).iter ()
for (auto it = hb_iter (this+coverage)
| hb_filter (glyphset); it; ++it)
{
from.push ()->set (glyph_map[*it]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册