Change hb_void_t implementation
This commit is contained in:
parent
cde31988c2
commit
d6024794fb
|
@ -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; };
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 <typename T>
|
||||
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 <typename T>
|
||||
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<T>);
|
||||
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_),
|
||||
|
|
Loading…
Reference in New Issue