From 2dbdec66a17af94fffc50949e4712465aada9a68 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 31 May 2019 15:38:11 -0700 Subject: [PATCH] [gsub] Porting serialize to iterators --- src/hb-ot-layout-gsub-table.hh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index 0e1966e98..e08f48ebd 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -87,8 +87,7 @@ struct SingleSubstFormat1 } template + hb_requires (hb_is_sorted_source_of (Iterator, hb_codepoint_t))> bool serialize (hb_serialize_context_t *c, Iterator glyphs, unsigned delta) @@ -339,8 +338,10 @@ struct Sequence return_trace (true); } + template bool serialize (hb_serialize_context_t *c, - hb_array_t subst) + Iterator subst) { TRACE_SERIALIZE (this); return_trace (substitute.serialize (c, subst)); @@ -515,8 +516,10 @@ struct AlternateSet return_trace (true); } + template bool serialize (hb_serialize_context_t *c, - hb_array_t alts) + Iterator alts) { TRACE_SERIALIZE (this); return_trace (alternates.serialize (c, alts)); @@ -729,9 +732,11 @@ struct Ligature return_trace (true); } + template bool serialize (hb_serialize_context_t *c, GlyphID ligature, - hb_array_t components /* Starting from second */) + Iterator components /* Starting from second */) { TRACE_SERIALIZE (this); if (unlikely (!c->extend_min (*this))) return_trace (false);