Use more iter pipelines

This commit is contained in:
Behdad Esfahbod committed 2019-01-20 20:12:12 -05:00
1 parent 420d8ac350
commit 934d3fa2a7
2 files changed
+23 -18

No files matched your search

+5 -4
View File
@@ -722,10 +722,11 @@ struct PairPosFormat1
{
bool intersects (const hb_set_t *glyphs) const
{
for (auto it = hb_zip (this+coverage, pairSet); it; ++it)
if (glyphs->has (it->first))
if ((this+it->second).intersects (glyphs, valueFormat))
return true;
for (auto it = hb_zip (this+coverage, pairSet)
| hb_filter (*glyphs, hb_first)
| hb_map (hb_second); it; ++it)
if ((this+*it).intersects (glyphs, valueFormat))
return true;
return false;
}
+18 -14
View File
@@ -1436,10 +1436,11 @@ struct ContextFormat1
{intersects_glyph},
nullptr
};
for (auto it = hb_zip (this+coverage, ruleSet); it; ++it)
if (glyphs->has (it->first))
if ((this+it->second).intersects (glyphs, lookup_context))
return true;
for (auto it = hb_zip (this+coverage, ruleSet)
| hb_filter (*glyphs, hb_first)
| hb_map (hb_second); it; ++it)
if ((this+*it).intersects (glyphs, lookup_context))
return true;
return false;
}
@@ -1449,9 +1450,10 @@ struct ContextFormat1
{intersects_glyph},
nullptr
};
for (auto it = hb_zip (this+coverage, ruleSet); it; ++it)
if (c->glyphs->has (it->first))
(this+it->second).closure (c, lookup_context);
for (auto it = hb_zip (this+coverage, ruleSet)
| hb_filter (*c->glyphs, hb_first)
| hb_map (hb_second); it; ++it)
(this+*it).closure (c, lookup_context);
}
void collect_glyphs (hb_collect_glyphs_context_t *c) const
@@ -2077,10 +2079,11 @@ struct ChainContextFormat1
{intersects_glyph},
{nullptr, nullptr, nullptr}
};
for (auto it = hb_zip (this+coverage, ruleSet); it; ++it)
if (glyphs->has (it->first))
if ((this+it->second).intersects (glyphs, lookup_context))
return true;
for (auto it = hb_zip (this+coverage, ruleSet)
| hb_filter (*glyphs, hb_first)
| hb_map (hb_second); it; ++it)
if ((this+*it).intersects (glyphs, lookup_context))
return true;
return false;
}
@@ -2090,9 +2093,10 @@ struct ChainContextFormat1
{intersects_glyph},
{nullptr, nullptr, nullptr}
};
for (auto it = hb_zip (this+coverage, ruleSet); it; ++it)
if (c->glyphs->has (it->first))
(this+it->second).closure (c, lookup_context);
for (auto it = hb_zip (this+coverage, ruleSet)
| hb_filter (*c->glyphs, hb_first)
| hb_map (hb_second); it; ++it)
(this+*it).closure (c, lookup_context);
}
void collect_glyphs (hb_collect_glyphs_context_t *c) const