提交 934d3fa2 编写于 作者: B Behdad Esfahbod

Use more iter pipelines

上级 420d8ac3
...@@ -722,10 +722,11 @@ struct PairPosFormat1 ...@@ -722,10 +722,11 @@ struct PairPosFormat1
{ {
bool intersects (const hb_set_t *glyphs) const bool intersects (const hb_set_t *glyphs) const
{ {
for (auto it = hb_zip (this+coverage, pairSet); it; ++it) for (auto it = hb_zip (this+coverage, pairSet)
if (glyphs->has (it->first)) | hb_filter (*glyphs, hb_first)
if ((this+it->second).intersects (glyphs, valueFormat)) | hb_map (hb_second); it; ++it)
return true; if ((this+*it).intersects (glyphs, valueFormat))
return true;
return false; return false;
} }
......
...@@ -1436,10 +1436,11 @@ struct ContextFormat1 ...@@ -1436,10 +1436,11 @@ struct ContextFormat1
{intersects_glyph}, {intersects_glyph},
nullptr nullptr
}; };
for (auto it = hb_zip (this+coverage, ruleSet); it; ++it) for (auto it = hb_zip (this+coverage, ruleSet)
if (glyphs->has (it->first)) | hb_filter (*glyphs, hb_first)
if ((this+it->second).intersects (glyphs, lookup_context)) | hb_map (hb_second); it; ++it)
return true; if ((this+*it).intersects (glyphs, lookup_context))
return true;
return false; return false;
} }
...@@ -1449,9 +1450,10 @@ struct ContextFormat1 ...@@ -1449,9 +1450,10 @@ struct ContextFormat1
{intersects_glyph}, {intersects_glyph},
nullptr nullptr
}; };
for (auto it = hb_zip (this+coverage, ruleSet); it; ++it) for (auto it = hb_zip (this+coverage, ruleSet)
if (c->glyphs->has (it->first)) | hb_filter (*c->glyphs, hb_first)
(this+it->second).closure (c, lookup_context); | hb_map (hb_second); it; ++it)
(this+*it).closure (c, lookup_context);
} }
void collect_glyphs (hb_collect_glyphs_context_t *c) const void collect_glyphs (hb_collect_glyphs_context_t *c) const
...@@ -2077,10 +2079,11 @@ struct ChainContextFormat1 ...@@ -2077,10 +2079,11 @@ struct ChainContextFormat1
{intersects_glyph}, {intersects_glyph},
{nullptr, nullptr, nullptr} {nullptr, nullptr, nullptr}
}; };
for (auto it = hb_zip (this+coverage, ruleSet); it; ++it) for (auto it = hb_zip (this+coverage, ruleSet)
if (glyphs->has (it->first)) | hb_filter (*glyphs, hb_first)
if ((this+it->second).intersects (glyphs, lookup_context)) | hb_map (hb_second); it; ++it)
return true; if ((this+*it).intersects (glyphs, lookup_context))
return true;
return false; return false;
} }
...@@ -2090,9 +2093,10 @@ struct ChainContextFormat1 ...@@ -2090,9 +2093,10 @@ struct ChainContextFormat1
{intersects_glyph}, {intersects_glyph},
{nullptr, nullptr, nullptr} {nullptr, nullptr, nullptr}
}; };
for (auto it = hb_zip (this+coverage, ruleSet); it; ++it) for (auto it = hb_zip (this+coverage, ruleSet)
if (c->glyphs->has (it->first)) | hb_filter (*c->glyphs, hb_first)
(this+it->second).closure (c, lookup_context); | hb_map (hb_second); it; ++it)
(this+*it).closure (c, lookup_context);
} }
void collect_glyphs (hb_collect_glyphs_context_t *c) const void collect_glyphs (hb_collect_glyphs_context_t *c) const
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册