From f8fcfb263e197c27015eeea56761b2dc8138da91 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 14 Feb 2019 11:03:29 -0800 Subject: [PATCH] [iter] Accept pointers to hb_sink() --- src/hb-iter.hh | 4 ++++ src/hb-ot-layout-gsub-table.hh | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/hb-iter.hh b/src/hb-iter.hh index 465929f75..b6c9e2d06 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -388,6 +388,10 @@ static const struct template hb_sink_t operator () (Sink&& s) const { return hb_sink_t (s); } + + template hb_sink_t + operator () (Sink *s) const + { return hb_sink_t (*s); } } hb_sink HB_UNUSED; diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index 57bb89015..17cf1742b 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -138,7 +138,7 @@ struct SingleSubstFormat2 + hb_zip (this+coverage, substitute) | hb_filter (*c->glyphs, hb_first) | hb_map (hb_second) - | hb_sink (*c->output) + | hb_sink (c->output) ; } @@ -147,7 +147,7 @@ struct SingleSubstFormat2 if (unlikely (!(this+coverage).add_coverage (c->input))) return; + hb_zip (this+coverage, substitute) | hb_map (hb_second) - | hb_sink (*c->output) + | hb_sink (c->output) ; } @@ -1023,7 +1023,7 @@ struct ReverseChainSingleSubstFormat1 + hb_zip (this+coverage, substitute) | hb_filter (*c->glyphs, hb_first) | hb_map (hb_second) - | hb_sink (*c->output) + | hb_sink (c->output) ; }