[dispatch] Default return type to hb_empty_t

pull/2473/head
Behdad Esfahbod 5 years ago
parent 8d0a90ac1b
commit 25aec0265c
  1. 2
      src/hb-dispatch.hh
  2. 2
      src/hb-ot-layout-common.hh
  3. 8
      src/hb-ot-layout-gsubgpos.hh

@ -35,7 +35,7 @@
* Dispatch
*/
template <typename Context, typename Return, unsigned int MaxDebugDepth=0>
template <typename Context, typename Return=hb_empty_t, unsigned int MaxDebugDepth=0>
struct hb_dispatch_context_t
{
private:

@ -151,7 +151,7 @@ struct hb_subset_layout_context_t :
};
struct hb_collect_variation_indices_context_t :
hb_dispatch_context_t<hb_collect_variation_indices_context_t, hb_empty_t>
hb_dispatch_context_t<hb_collect_variation_indices_context_t>
{
template <typename T>
return_t dispatch (const T &obj) { obj.collect_variation_indices (this); return hb_empty_t (); }

@ -58,7 +58,7 @@ struct hb_intersects_context_t :
};
struct hb_closure_context_t :
hb_dispatch_context_t<hb_closure_context_t, hb_empty_t>
hb_dispatch_context_t<hb_closure_context_t>
{
typedef return_t (*recurse_func_t) (hb_closure_context_t *c, unsigned int lookup_index);
template <typename T>
@ -132,7 +132,7 @@ struct hb_closure_context_t :
};
struct hb_closure_lookups_context_t :
hb_dispatch_context_t<hb_closure_lookups_context_t, hb_empty_t>
hb_dispatch_context_t<hb_closure_lookups_context_t>
{
typedef return_t (*recurse_func_t) (hb_closure_lookups_context_t *c, unsigned lookup_index);
template <typename T>
@ -224,7 +224,7 @@ struct hb_would_apply_context_t :
};
struct hb_collect_glyphs_context_t :
hb_dispatch_context_t<hb_collect_glyphs_context_t, hb_empty_t>
hb_dispatch_context_t<hb_collect_glyphs_context_t>
{
typedef return_t (*recurse_func_t) (hb_collect_glyphs_context_t *c, unsigned int lookup_index);
template <typename T>
@ -694,7 +694,7 @@ struct hb_ot_apply_context_t :
struct hb_get_subtables_context_t :
hb_dispatch_context_t<hb_get_subtables_context_t, hb_empty_t>
hb_dispatch_context_t<hb_get_subtables_context_t>
{
template <typename Type>
static inline bool apply_to (const void *obj, OT::hb_ot_apply_context_t *c)

Loading…
Cancel
Save