[iter] Port more to daggers

pull/1646/head
Behdad Esfahbod 6 years ago
parent 9d8c72042b
commit 4d28267e59
  1. 22
      src/hb-ot-layout-gsub-table.hh

@ -753,25 +753,25 @@ struct LigatureSet
{ {
bool intersects (const hb_set_t *glyphs) const bool intersects (const hb_set_t *glyphs) const
{ {
unsigned int num_ligs = ligature.len; return
for (unsigned int i = 0; i < num_ligs; i++) + hb_iter (ligature)
if ((this+ligature[i]).intersects (glyphs)) | hb_map ([&] (const OffsetTo<Ligature> &_) -> bool { return (this+_).intersects (glyphs); })
return true; | hb_any
return false; ;
} }
void closure (hb_closure_context_t *c) const void closure (hb_closure_context_t *c) const
{ {
unsigned int num_ligs = ligature.len; + hb_iter (ligature)
for (unsigned int i = 0; i < num_ligs; i++) | hb_apply ([&] (const OffsetTo<Ligature> &_) { (this+_).closure (c); })
(this+ligature[i]).closure (c); ;
} }
void collect_glyphs (hb_collect_glyphs_context_t *c) const void collect_glyphs (hb_collect_glyphs_context_t *c) const
{ {
unsigned int num_ligs = ligature.len; + hb_iter (ligature)
for (unsigned int i = 0; i < num_ligs; i++) | hb_apply ([&] (const OffsetTo<Ligature> &_) { (this+_).collect_glyphs (c); })
(this+ligature[i]).collect_glyphs (c); ;
} }
bool would_apply (hb_would_apply_context_t *c) const bool would_apply (hb_would_apply_context_t *c) const

Loading…
Cancel
Save