From 130bb3f6144afe5c88bb5b4e4c98e7cba03b1e26 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 5 Dec 2012 16:49:47 -0500 Subject: [PATCH] Rename VOID and void_t to have HarfBuzz prefix Fixes build on Windows. Ouch! --- src/hb-ot-layout-gsubgpos-private.hh | 22 +++++++++++----------- src/hb-private.hh | 12 ++++++------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index 63c23d540..d656999cd 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -49,7 +49,7 @@ namespace OT { #endif #define TRACE_CLOSURE(this) \ - hb_auto_trace_t trace \ + hb_auto_trace_t trace \ (&c->debug_depth, c->get_name (), this, HB_FUNC, \ ""); @@ -57,11 +57,11 @@ struct hb_closure_context_t { inline const char *get_name (void) { return "CLOSURE"; } static const unsigned int max_debug_depth = HB_DEBUG_CLOSURE; - typedef void_t return_t; + typedef hb_void_t return_t; typedef return_t (*recurse_func_t) (hb_closure_context_t *c, unsigned int lookup_index); template - inline return_t process (const T &obj) { obj.closure (this); return VOID; } - static return_t default_return_value (void) { return VOID; } + inline return_t process (const T &obj) { obj.closure (this); return HB_VOID; } + static return_t default_return_value (void) { return HB_VOID; } bool stop_sublookup_iteration (const return_t r) const { return false; } return_t recurse (unsigned int lookup_index) { @@ -71,7 +71,7 @@ struct hb_closure_context_t nesting_level_left--; recurse_func (this, lookup_index); nesting_level_left++; - return VOID; + return HB_VOID; } hb_face_t *face; @@ -137,7 +137,7 @@ struct hb_would_apply_context_t #endif #define TRACE_COLLECT_GLYPHS(this) \ - hb_auto_trace_t trace \ + hb_auto_trace_t trace \ (&c->debug_depth, c->get_name (), this, HB_FUNC, \ ""); @@ -145,11 +145,11 @@ struct hb_collect_glyphs_context_t { inline const char *get_name (void) { return "COLLECT_GLYPHS"; } static const unsigned int max_debug_depth = HB_DEBUG_COLLECT_GLYPHS; - typedef void_t return_t; + typedef hb_void_t return_t; typedef return_t (*recurse_func_t) (hb_collect_glyphs_context_t *c, unsigned int lookup_index); template - inline return_t process (const T &obj) { obj.collect_glyphs (this); return VOID; } - static return_t default_return_value (void) { return VOID; } + inline return_t process (const T &obj) { obj.collect_glyphs (this); return HB_VOID; } + static return_t default_return_value (void) { return HB_VOID; } bool stop_sublookup_iteration (const return_t r) const { return false; } return_t recurse (unsigned int lookup_index) { @@ -161,7 +161,7 @@ struct hb_collect_glyphs_context_t * glyphs in the recursion. If output is not requested, we can go home now. */ if (output == hb_set_get_empty ()) - return VOID; + return HB_VOID; hb_set_t *old_before = before; hb_set_t *old_input = input; @@ -176,7 +176,7 @@ struct hb_collect_glyphs_context_t input = old_input; after = old_after; - return VOID; + return HB_VOID; } hb_face_t *face; diff --git a/src/hb-private.hh b/src/hb-private.hh index 265fba15d..7824956e3 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -63,9 +63,9 @@ /* Void! */ -struct _void_t; -typedef const _void_t &void_t; -#define VOID (* (const _void_t *) NULL) +struct _hb_void_t; +typedef const _hb_void_t &hb_void_t; +#define HB_VOID (* (const _hb_void_t *) NULL) /* Basics */ @@ -679,8 +679,8 @@ struct hb_printer_t { }; template <> -struct hb_printer_t { - const char *print (void_t v) { return ""; } +struct hb_printer_t { + const char *print (hb_void_t v) { return ""; } }; @@ -696,7 +696,7 @@ static inline void _hb_warn_no_return (bool returned) } } template <> -inline void _hb_warn_no_return (bool returned) +inline void _hb_warn_no_return (bool returned) {} template