diff --git a/src/hb-array.hh b/src/hb-array.hh index 705bc6a46..ae0d16684 100644 --- a/src/hb-array.hh +++ b/src/hb-array.hh @@ -319,7 +319,7 @@ bool hb_array_t::operator == (const hb_array_t &o) const { return length == o.length && + hb_zip (*this, o) - | hb_map ([] (hb_pair_t &&_) -> bool { return _.first == _.second; }) + | hb_map ([] (hb_pair_t &&_) { return _.first == _.second; }) | hb_all ; } @@ -329,7 +329,7 @@ uint32_t hb_array_t::hash () const return + hb_iter (*this) | hb_map (hb_hash) - | hb_reduce ([] (uint32_t a, uint32_t b) -> uint32_t { return a * 31 + b; }, 0) + | hb_reduce ([] (uint32_t a, uint32_t b) { return a * 31 + b; }, 0) ; } diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index a6e9a7534..6937e8a72 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -48,7 +48,7 @@ struct SingleSubstFormat1 { + hb_iter (this+coverage) | hb_filter (*c->glyphs) - | hb_map ([&] (hb_codepoint_t g) -> hb_codepoint_t { return (g + deltaGlyphID) & 0xFFFFu; }) + | hb_map ([&] (hb_codepoint_t g) { return (g + deltaGlyphID) & 0xFFFFu; }) | hb_sink (c->output) ; } @@ -58,7 +58,7 @@ struct SingleSubstFormat1 if (unlikely (!(this+coverage).add_coverage (c->input))) return; + hb_iter (this+coverage) - | hb_map ([&] (hb_codepoint_t g) -> hb_codepoint_t { return (g + deltaGlyphID) & 0xFFFFu; }) + | hb_map ([&] (hb_codepoint_t g) { return (g + deltaGlyphID) & 0xFFFFu; }) | hb_sink (c->output) ; } @@ -741,7 +741,7 @@ struct LigatureSet { return + hb_iter (ligature) - | hb_map ([&] (const OffsetTo &_) -> bool { return (this+_).intersects (glyphs); }) + | hb_map ([&] (const OffsetTo &_) { return (this+_).intersects (glyphs); }) | hb_any ; } @@ -764,7 +764,7 @@ struct LigatureSet { return + hb_iter (ligature) - | hb_map ([&] (const OffsetTo &_) -> bool { return (this+_).would_apply (c); }) + | hb_map ([&] (const OffsetTo &_) { return (this+_).would_apply (c); }) | hb_any ; } diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 5946db7c4..a8deb70d4 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -708,7 +708,7 @@ static inline bool intersects_array (const hb_set_t *glyphs, { return + hb_iter (values, count) - | hb_map ([&] (const HBUINT16 &_) -> bool { return intersects_func (glyphs, _, intersects_data); }) + | hb_map ([&] (const HBUINT16 &_) { return intersects_func (glyphs, _, intersects_data); }) | hb_any ; } @@ -1371,7 +1371,7 @@ struct RuleSet { return + hb_iter (rule) - | hb_map ([&] (const OffsetTo &_) -> bool { return (this+_).intersects (glyphs, lookup_context); }) + | hb_map ([&] (const OffsetTo &_) { return (this+_).intersects (glyphs, lookup_context); }) | hb_any ; } @@ -1399,7 +1399,7 @@ struct RuleSet { return + hb_iter (rule) - | hb_map ([&] (const OffsetTo &_) -> bool { return (this+_).would_apply (c, lookup_context); }) + | hb_map ([&] (const OffsetTo &_) { return (this+_).would_apply (c, lookup_context); }) | hb_any ; } @@ -1410,7 +1410,7 @@ struct RuleSet TRACE_APPLY (this); return_trace ( + hb_iter (rule) - | hb_map ([&] (const OffsetTo &_) -> bool { return (this+_).apply (c, lookup_context); }) + | hb_map ([&] (const OffsetTo &_) { return (this+_).apply (c, lookup_context); }) | hb_any ) ; @@ -1444,7 +1444,7 @@ struct ContextFormat1 + hb_zip (this+coverage, ruleSet) | hb_filter (*glyphs, hb_first) | hb_map (hb_second) - | hb_map ([&] (const OffsetTo &_) -> bool { return (this+_).intersects (glyphs, lookup_context); }) + | hb_map ([&] (const OffsetTo &_) { return (this+_).intersects (glyphs, lookup_context); }) | hb_any ; } @@ -2022,7 +2022,7 @@ struct ChainRuleSet { return + hb_iter (rule) - | hb_map ([&] (const OffsetTo &_) -> bool { return (this+_).intersects (glyphs, lookup_context); }) + | hb_map ([&] (const OffsetTo &_) { return (this+_).intersects (glyphs, lookup_context); }) | hb_any ; } @@ -2046,7 +2046,7 @@ struct ChainRuleSet { return + hb_iter (rule) - | hb_map ([&] (const OffsetTo &_) -> bool { return (this+_).would_apply (c, lookup_context); }) + | hb_map ([&] (const OffsetTo &_) { return (this+_).would_apply (c, lookup_context); }) | hb_any ; } @@ -2056,7 +2056,7 @@ struct ChainRuleSet TRACE_APPLY (this); return_trace ( + hb_iter (rule) - | hb_map ([&] (const OffsetTo &_) -> bool { return (this+_).apply (c, lookup_context); }) + | hb_map ([&] (const OffsetTo &_) { return (this+_).apply (c, lookup_context); }) | hb_any ) ; @@ -2089,7 +2089,7 @@ struct ChainContextFormat1 + hb_zip (this+coverage, ruleSet) | hb_filter (*glyphs, hb_first) | hb_map (hb_second) - | hb_map ([&] (const OffsetTo &_) -> bool { return (this+_).intersects (glyphs, lookup_context); }) + | hb_map ([&] (const OffsetTo &_) { return (this+_).intersects (glyphs, lookup_context); }) | hb_any ; } diff --git a/src/hb-ot-stat-table.hh b/src/hb-ot-stat-table.hh index e6fa9b0bc..72d377281 100644 --- a/src/hb-ot-stat-table.hh +++ b/src/hb-ot-stat-table.hh @@ -289,7 +289,7 @@ struct STAT ; + get_axis_value_offsets () - | hb_map ([&] (const OffsetTo& _) -> const AxisValue* { return hb_addressof (this + _); }) + | hb_map ([&] (const OffsetTo& _) { return hb_addressof (this + _); }) | hb_map (&AxisValue::get_value_name_id) | hb_sink (nameids_to_retain) ; diff --git a/src/hb-ot-var-fvar-table.hh b/src/hb-ot-var-fvar-table.hh index 3cdf61405..8b3b38ce9 100644 --- a/src/hb-ot-var-fvar-table.hh +++ b/src/hb-ot-var-fvar-table.hh @@ -290,12 +290,12 @@ struct fvar ; + hb_range ((unsigned) instanceCount) - | hb_map ([&] (const unsigned _) -> unsigned { return get_instance_subfamily_name_id (_); }) + | hb_map ([&] (const unsigned _) { return get_instance_subfamily_name_id (_); }) | hb_sink (nameids) ; + hb_range ((unsigned) instanceCount) - | hb_map ([&] (const unsigned _) -> unsigned { return get_instance_postscript_name_id (_); }) + | hb_map ([&] (const unsigned _) { return get_instance_postscript_name_id (_); }) | hb_sink (nameids) ; } diff --git a/src/test-iter.cc b/src/test-iter.cc index f834640ff..c36453d1f 100644 --- a/src/test-iter.cc +++ b/src/test-iter.cc @@ -203,8 +203,8 @@ main (int argc, char **argv) ; + hb_iter (src) - | hb_map ([&] (int i) -> int { return 1; }) - | hb_reduce ([&] (int acc, int value) -> int { return acc; }, 2) + | hb_map ([&] (int i) { return 1; }) + | hb_reduce ([&] (int acc, int value) { return acc; }, 2) ; using map_pair_t = hb_item_type; @@ -251,8 +251,8 @@ main (int argc, char **argv) unsigned int temp3 = 0; + hb_iter(src) - | hb_map([&] (int i) -> int { return ++temp3; }) - | hb_reduce([&] (float acc, int value) -> float { return acc + value; }, 0) + | hb_map([&] (int i) { return ++temp3; }) + | hb_reduce([&] (float acc, int value) { return acc + value; }, 0) ; hb_map_destroy (result); diff --git a/src/test-meta.cc b/src/test-meta.cc index ffd360b0d..0b6e02c26 100644 --- a/src/test-meta.cc +++ b/src/test-meta.cc @@ -32,7 +32,6 @@ int main (int argc, char **argv) { - static_assert (hb_is_convertible (void, void), ""); static_assert (hb_is_convertible (void, const void), ""); static_assert (hb_is_convertible (const void, void), "");