[OTLayout] Start porting sanitize() to process()
This commit is contained in:
parent
f48ec0e834
commit
2c53bd3c3e
@ -168,12 +168,22 @@ ASSERT_STATIC (Type::min_size + 1 <= sizeof (_Null##Type))
|
||||
|
||||
#define TRACE_SANITIZE(this) \
|
||||
hb_auto_trace_t<HB_DEBUG_SANITIZE, bool> trace \
|
||||
(&c->debug_depth, "SANITIZE", this, HB_FUNC, \
|
||||
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
|
||||
"");
|
||||
|
||||
|
||||
struct hb_sanitize_context_t
|
||||
{
|
||||
inline const char *get_name (void) { return "SANITIZE"; }
|
||||
static const unsigned int max_debug_depth = HB_DEBUG_SANITIZE;
|
||||
typedef bool return_t;
|
||||
template <typename T>
|
||||
inline return_t process (const T &obj) { return obj.sanitize (this); }
|
||||
static return_t default_return_value (void) { return true; }
|
||||
bool stop_sublookup_iteration (const return_t r) const { return false; }
|
||||
return_t recurse (unsigned int lookup_index)
|
||||
{ return default_return_value (); }
|
||||
|
||||
inline void init (hb_blob_t *b)
|
||||
{
|
||||
this->blob = hb_blob_reference (b);
|
||||
|
@ -50,7 +50,7 @@ namespace OT {
|
||||
|
||||
#define TRACE_CLOSURE(this) \
|
||||
hb_auto_trace_t<HB_DEBUG_CLOSURE, void_t> trace \
|
||||
(&c->debug_depth, "CLOSURE", this, HB_FUNC, \
|
||||
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
|
||||
"");
|
||||
|
||||
struct hb_closure_context_t
|
||||
@ -99,7 +99,7 @@ struct hb_closure_context_t
|
||||
|
||||
#define TRACE_WOULD_APPLY(this) \
|
||||
hb_auto_trace_t<HB_DEBUG_WOULD_APPLY, bool> trace \
|
||||
(&c->debug_depth, "WOULD_APPLY", this, HB_FUNC, \
|
||||
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
|
||||
"%d glyphs", c->len);
|
||||
|
||||
struct hb_would_apply_context_t
|
||||
@ -138,7 +138,7 @@ struct hb_would_apply_context_t
|
||||
|
||||
#define TRACE_COLLECT_GLYPHS(this) \
|
||||
hb_auto_trace_t<HB_DEBUG_COLLECT_GLYPHS, void_t> trace \
|
||||
(&c->debug_depth, "COLLECT_GLYPHS", this, HB_FUNC, \
|
||||
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
|
||||
"");
|
||||
|
||||
struct hb_collect_glyphs_context_t
|
||||
@ -206,7 +206,7 @@ struct hb_get_coverage_context_t
|
||||
|
||||
#define TRACE_APPLY(this) \
|
||||
hb_auto_trace_t<HB_DEBUG_APPLY, bool> trace \
|
||||
(&c->debug_depth, "APPLY", this, HB_FUNC, \
|
||||
(&c->debug_depth, c->get_name (), this, HB_FUNC, \
|
||||
"idx %d codepoint %u", c->buffer->idx, c->buffer->cur().codepoint);
|
||||
|
||||
struct hb_apply_context_t
|
||||
|
Loading…
Reference in New Issue
Block a user