intersects_func_t intersects_func,
const void *intersects_data)
{
- for (auto it = hb_iter (values, count); it; ++it)
- if (likely (!intersects_func (glyphs, *it, intersects_data)))
- return false;
- return true;
+ return
+ + hb_iter (values, count)
+ | hb_map ([&] (const HBUINT16 &_) -> bool { return intersects_func (glyphs, _, intersects_data); })
+ | hb_any
+ ;
}
collect_glyphs_func_t collect_func,
const void *collect_data)
{
- for (auto it = hb_iter (values, count); it; ++it)
- collect_func (glyphs, *it, collect_data);
+ return
+ + hb_iter (values, count)
+ | hb_apply ([&] (const HBUINT16 &_) { collect_func (glyphs, _, collect_data); })
+ ;
}
bool intersects (const hb_set_t *glyphs,
ContextClosureLookupContext &lookup_context) const
{
- for (auto it = hb_iter (rule); it; ++it)
- if ((this+*it).intersects (glyphs, lookup_context))
- return true;
- return false;
+ return
+ + hb_iter (rule)
+ | hb_map ([&] (const OffsetTo<Rule> &_) -> bool { return (this+_).intersects (glyphs, lookup_context); })
+ | hb_any
+ ;
}
void closure (hb_closure_context_t *c,
ContextClosureLookupContext &lookup_context) const
{
- for (auto it = hb_iter (rule); it; ++it)
- (this+*it).closure (c, lookup_context);
+ return
+ + hb_iter (rule)
+ | hb_apply ([&] (const OffsetTo<Rule> &_) { (this+_).closure (c, lookup_context); })
+ ;
}
void collect_glyphs (hb_collect_glyphs_context_t *c,
ContextCollectGlyphsLookupContext &lookup_context) const
{
- for (auto it = hb_iter (rule); it; ++it)
- (this+*it).collect_glyphs (c, lookup_context);
+ return
+ + hb_iter (rule)
+ | hb_apply ([&] (const OffsetTo<Rule> &_) { (this+_).collect_glyphs (c, lookup_context); })
+ ;
}
bool would_apply (hb_would_apply_context_t *c,
ContextApplyLookupContext &lookup_context) const
{
- for (auto it = hb_iter (rule); it; ++it)
- if ((this+*it).would_apply (c, lookup_context))
- return true;
- return false;
+ return
+ + hb_iter (rule)
+ | hb_map ([&] (const OffsetTo<Rule> &_) -> bool { return (this+_).would_apply (c, lookup_context); })
+ | hb_any
+ ;
}
bool apply (hb_ot_apply_context_t *c,
ContextApplyLookupContext &lookup_context) const
{
TRACE_APPLY (this);
- for (auto it = hb_iter (rule); it; ++it)
- if ((this+*it).apply (c, lookup_context))
- return_trace (true);
- return_trace (false);
+ return_trace (
+ + hb_iter (rule)
+ | hb_map ([&] (const OffsetTo<Rule> &_) -> bool { return (this+_).apply (c, lookup_context); })
+ | hb_any
+ )
+ ;
}
bool sanitize (hb_sanitize_context_t *c) const