Rename VOID and void_t to have HarfBuzz prefix

Fixes build on Windows.  Ouch!
This commit is contained in:
Behdad Esfahbod 2012-12-05 16:49:47 -05:00
parent 4a350d0eb2
commit 130bb3f614
2 changed files with 17 additions and 17 deletions

View File

@ -49,7 +49,7 @@ namespace OT {
#endif
#define TRACE_CLOSURE(this) \
hb_auto_trace_t<HB_DEBUG_CLOSURE, void_t> trace \
hb_auto_trace_t<HB_DEBUG_CLOSURE, hb_void_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 <typename T>
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<HB_DEBUG_COLLECT_GLYPHS, void_t> trace \
hb_auto_trace_t<HB_DEBUG_COLLECT_GLYPHS, hb_void_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 <typename T>
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;

View File

@ -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<bool> {
};
template <>
struct hb_printer_t<void_t> {
const char *print (void_t v) { return ""; }
struct hb_printer_t<hb_void_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<void_t> (bool returned)
inline void _hb_warn_no_return<hb_void_t> (bool returned)
{}
template <int max_level, typename ret_t>