summaryrefslogtreecommitdiffstats
path: root/third_party/harfbuzz-ng/src/hb-ot-name-table.hh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/harfbuzz-ng/src/hb-ot-name-table.hh')
-rw-r--r--third_party/harfbuzz-ng/src/hb-ot-name-table.hh17
1 files changed, 8 insertions, 9 deletions
diff --git a/third_party/harfbuzz-ng/src/hb-ot-name-table.hh b/third_party/harfbuzz-ng/src/hb-ot-name-table.hh
index 0e9f7a4..9077c8c 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-name-table.hh
+++ b/third_party/harfbuzz-ng/src/hb-ot-name-table.hh
@@ -1,5 +1,5 @@
/*
- * Copyright © 2011 Google, Inc.
+ * Copyright © 2011,2012 Google, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
@@ -57,8 +57,7 @@ struct NameRecord
inline bool sanitize (hb_sanitize_context_t *c, void *base) {
TRACE_SANITIZE ();
/* We can check from base all the way up to the end of string... */
- return c->check_struct (this) &&
- c->check_range ((char *) base, (unsigned int) length + offset);
+ return TRACE_RETURN (c->check_struct (this) && c->check_range ((char *) base, (unsigned int) length + offset));
}
USHORT platformID; /* Platform ID. */
@@ -102,16 +101,16 @@ struct name
char *string_pool = (char *) this + stringOffset;
unsigned int _count = count;
for (unsigned int i = 0; i < _count; i++)
- if (!nameRecord[i].sanitize (c, string_pool)) return false;
- return true;
+ if (!nameRecord[i].sanitize (c, string_pool)) return TRACE_RETURN (false);
+ return TRACE_RETURN (true);
}
inline bool sanitize (hb_sanitize_context_t *c) {
TRACE_SANITIZE ();
- return c->check_struct (this) &&
- likely (format == 0 || format == 1) &&
- c->check_array (nameRecord, nameRecord[0].static_size, count) &&
- sanitize_records (c);
+ return TRACE_RETURN (c->check_struct (this) &&
+ likely (format == 0 || format == 1) &&
+ c->check_array (nameRecord, nameRecord[0].static_size, count) &&
+ sanitize_records (c));
}
/* We only implement format 0 for now. */