diff --git a/src/hb-machinery.hh b/src/hb-machinery.hh index 3e2f84038..3af3a606a 100644 --- a/src/hb-machinery.hh +++ b/src/hb-machinery.hh @@ -655,10 +655,16 @@ struct Supplier len = len_; stride = stride_; } - inline Supplier (const hb_vector_t *v) + inline Supplier (hb_array_t v) { - head = (const Type *) *v; - len = v->len; + head = v.arrayZ; + len = v.len; + stride = sizeof (Type); + } + inline Supplier (const hb_vector_t &v) + { + head = (const Type *) v; + len = v.len; stride = sizeof (Type); } diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index 5347691ed..1013dc6e0 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -495,8 +495,7 @@ struct CmapSubtableLongSegmented { TRACE_SERIALIZE (this); if (unlikely (!c->extend_min (*this))) return_trace (false); - Supplier supplier ((const OT::CmapSubtableLongGroup*) group_data, - group_data.len); + Supplier supplier (group_data); if (unlikely (!groups.serialize (c, supplier, group_data.len))) return_trace (false); return true; } diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index 1af69872a..9ce4b1662 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -123,8 +123,8 @@ struct SingleSubstFormat1 } c->serializer->err (from.in_error () || to.in_error ()); - Supplier from_supplier (&from); - Supplier to_supplier (&to); + Supplier from_supplier (from); + Supplier to_supplier (to); SingleSubst_serialize (c->serializer, from_supplier, to_supplier, @@ -229,8 +229,8 @@ struct SingleSubstFormat2 } c->serializer->err (from.in_error () || to.in_error ()); - Supplier from_supplier (&from); - Supplier to_supplier (&to); + Supplier from_supplier (from); + Supplier to_supplier (to); SingleSubst_serialize (c->serializer, from_supplier, to_supplier,