Fix clang -Wrange-loop-analysis complains
./hb-ot-layout-gpos-table.hh:674:43: error: loop variable '_' is always a copy because the range of type 'hb_zip_iter_t<hb_iter_type<hb_array_t<const OT::IntType<unsigned short, 2> > &>, hb_iter_type<hb_array_t<const OT::IntType<unsigned short, 2> > &> >' (aka 'hb_zip_iter_t<hb_array_t<const OT::IntType<unsigned short, 2> >, hb_array_t<const OT::IntType<unsigned short, 2> > >') does not return a reference [-Werror,-Wrange-loop-analysis] for (const hb_pair_t<Value, Value>& _ : hb_zip (val_iter, first_val_iter)) ^ ./hb-ot-layout-gpos-table.hh:674:12: note: use non-reference type 'hb_pair_t<OT::Value, OT::Value>' (aka 'hb_pair_t<IntType<unsigned short, 2>, IntType<unsigned short, 2> >') for (const hb_pair_t<Value, Value>& _ : hb_zip (val_iter, first_val_iter)) and In file included from hb-subset.cc:44: ./hb-ot-vorg-table.hh:87:34: error: loop variable '_' is always a copy because the range of type 'hb_map_iter_t<hb_filter_iter_t<hb_sorted_array_t<const OT::VertOriginMetric>, const hb_set_t *, OT::HBGlyphID OT::VertOriginMetric::*, nullptr>, (lambda at ./hb-ot-vorg-table.hh💯15), hb_function_sortedness_t::NOT_SORTED, nullptr>' does not return a reference [-Werror,-Wrange-loop-analysis] for (const VertOriginMetric& _ : it) ^ ./hb-ot-vorg-table.hh:113:17: note: in instantiation of function template specialization 'OT::VORG::serialize<hb_map_iter_t<hb_filter_iter_t<hb_sorted_array_t<const OT::VertOriginMetric>, const hb_set_t *, OT::HBGlyphID OT::VertOriginMetric::*, nullptr>, (lambda at ./hb-ot-vorg-table.hh💯15), hb_function_sortedness_t::NOT_SORTED, nullptr>, nullptr>' requested here vorg_prime->serialize (c->serializer, it, defaultVertOriginY); ^ ./hb-ot-vorg-table.hh:87:10: note: use non-reference type 'OT::VertOriginMetric' for (const VertOriginMetric& _ : it) ^~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
6e42a418c8
commit
d87d38998a
@ -671,7 +671,7 @@ struct SinglePos
|
||||
|
||||
for (hb_array_t<const Value> val_iter : + glyph_val_iter_pairs
|
||||
| hb_map (hb_second))
|
||||
for (const hb_pair_t<Value, Value>& _ : hb_zip (val_iter, first_val_iter))
|
||||
for (const hb_pair_t<Value, Value> _ : hb_zip (val_iter, first_val_iter))
|
||||
if (_.first != _.second)
|
||||
{
|
||||
subset_format = 2;
|
||||
|
@ -84,7 +84,7 @@ struct VORG
|
||||
this->defaultVertOriginY = defaultVertOriginY;
|
||||
this->vertYOrigins.len = it.len ();
|
||||
|
||||
for (const VertOriginMetric& _ : it)
|
||||
for (const VertOriginMetric _ : it)
|
||||
c->copy (_);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user