From 6e33a3955df77b9d1fda5ea44302d97b21e7871c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 13 Dec 2018 16:40:01 -0500 Subject: [PATCH] Minor --- src/hb-machinery.hh | 12 +++++++++--- src/hb-ot-cmap-table.hh | 3 +-- src/hb-ot-layout-gsub-table.hh | 8 ++++---- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/hb-machinery.hh b/src/hb-machinery.hh index 3e2f840..3af3a60 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 5347691..1013dc6 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 1af6987..9ce4b16 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, -- 2.7.4