diff --git a/src/hb-dsalgs.hh b/src/hb-dsalgs.hh index f79a3f856..1d2f753c6 100644 --- a/src/hb-dsalgs.hh +++ b/src/hb-dsalgs.hh @@ -32,8 +32,7 @@ /* Void! For when we need a expression-type of void. */ -typedef const struct _hb_void_t *hb_void_t; -#define HB_VOID ((const _hb_void_t *) nullptr) +struct hb_void_t { typedef void value; }; /* diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index 74b4b7395..d9065afe8 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -1380,7 +1380,7 @@ struct SubstLookup : Lookup static hb_closure_context_t::return_t dispatch_closure_recurse_func (hb_closure_context_t *c, unsigned int lookup_index) { if (!c->should_visit_lookup (lookup_index)) - return HB_VOID; + return hb_void_t (); hb_closure_context_t::return_t ret = dispatch_recurse_func (c, lookup_index); diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index b1721d85b..380d18b11 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -64,8 +64,8 @@ struct hb_closure_context_t : const char *get_name () { return "CLOSURE"; } typedef return_t (*recurse_func_t) (hb_closure_context_t *c, unsigned int lookup_index); template - return_t dispatch (const T &obj) { obj.closure (this); return HB_VOID; } - static return_t default_return_value () { return HB_VOID; } + return_t dispatch (const T &obj) { obj.closure (this); return hb_void_t (); } + static return_t default_return_value () { return hb_void_t (); } void recurse (unsigned int lookup_index) { if (unlikely (nesting_level_left == 0 || !recurse_func)) @@ -156,8 +156,8 @@ struct hb_collect_glyphs_context_t : const char *get_name () { return "COLLECT_GLYPHS"; } typedef return_t (*recurse_func_t) (hb_collect_glyphs_context_t *c, unsigned int lookup_index); template - return_t dispatch (const T &obj) { obj.collect_glyphs (this); return HB_VOID; } - static return_t default_return_value () { return HB_VOID; } + return_t dispatch (const T &obj) { obj.collect_glyphs (this); return hb_void_t (); } + static return_t default_return_value () { return hb_void_t (); } void recurse (unsigned int lookup_index) { if (unlikely (nesting_level_left == 0 || !recurse_func)) @@ -652,9 +652,9 @@ struct hb_get_subtables_context_t : { hb_applicable_t *entry = array.push(); entry->init (obj, apply_to); - return HB_VOID; + return hb_void_t (); } - static return_t default_return_value () { return HB_VOID; } + static return_t default_return_value () { return hb_void_t (); } hb_get_subtables_context_t (array_t &array_) : array (array_),