[dispatch] Default return type to hb_empty_t

This commit is contained in:
Behdad Esfahbod 2020-06-18 16:58:01 -07:00
parent 8d0a90ac1b
commit 25aec0265c
3 changed files with 6 additions and 6 deletions

View File

@ -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:

View File

@ -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 (); }

View File

@ -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)