提交 e5306927 编写于 作者: B Behdad Esfahbod

[iter] Fix bug in hb_any() and hb_none()

上级 f505b5d5
......@@ -552,7 +552,7 @@ static const struct
operator () (Iterable&& c) const
{
for (auto it = hb_iter (c); it; ++it)
if (it)
if (*it)
return true;
return false;
}
......@@ -566,7 +566,7 @@ static const struct
operator () (Iterable&& c) const
{
for (auto it = hb_iter (c); it; ++it)
if (it)
if (*it)
return false;
return true;
}
......
......@@ -1546,9 +1546,9 @@ struct ContextFormat2
return
+ hb_enumerate (ruleSet)
| hb_filter ([&] (const hb_pair_t<unsigned, const OffsetTo<RuleSet> &> p) -> bool
{ return class_def.intersects_class (glyphs, p.first) &&
(this+p.second).intersects (glyphs, lookup_context); })
| hb_map ([&] (const hb_pair_t<unsigned, const OffsetTo<RuleSet> &> p) -> bool
{ return class_def.intersects_class (glyphs, p.first) &&
(this+p.second).intersects (glyphs, lookup_context); })
| hb_any
;
}
......@@ -2193,9 +2193,9 @@ struct ChainContextFormat2
return
+ hb_enumerate (ruleSet)
| hb_filter ([&] (const hb_pair_t<unsigned, const OffsetTo<ChainRuleSet> &> p) -> bool
{ return input_class_def.intersects_class (glyphs, p.first) &&
(this+p.second).intersects (glyphs, lookup_context); })
| hb_map ([&] (const hb_pair_t<unsigned, const OffsetTo<ChainRuleSet> &> p) -> bool
{ return input_class_def.intersects_class (glyphs, p.first) &&
(this+p.second).intersects (glyphs, lookup_context); })
| hb_any
;
}
......
......@@ -137,7 +137,7 @@ main (int argc, char **argv)
test_iterator (hb_zip (st, v));
hb_any (hb_zip (st, v));
hb_any (st);
hb_array_t<hb_vector_t<int> > pa;
pa->as_array ();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册