return 0;
}
- inline bool sanitize (hb_sanitize_context_t *c, void *base) {
+ inline bool sanitize (hb_sanitize_context_t *c, const void *base) const
+ {
TRACE_SANITIZE (this);
/* We can check from base all the way up to the end of string... */
return TRACE_RETURN (c->check_struct (this) && c->check_range ((char *) base, (unsigned int) length + offset));
struct name
{
- static const hb_tag_t Tag = HB_OT_TAG_name;
+ static const hb_tag_t tableTag = HB_OT_TAG_name;
inline unsigned int get_name (unsigned int platform_id,
unsigned int encoding_id,
return length;
}
- inline bool sanitize_records (hb_sanitize_context_t *c) {
+ inline unsigned int get_size (void) const
+ { return min_size + count * nameRecord[0].min_size; }
+
+ inline bool sanitize_records (hb_sanitize_context_t *c) const {
TRACE_SANITIZE (this);
char *string_pool = (char *) this + stringOffset;
unsigned int _count = count;
return TRACE_RETURN (true);
}
- inline bool sanitize (hb_sanitize_context_t *c) {
+ inline bool sanitize (hb_sanitize_context_t *c) const
+ {
TRACE_SANITIZE (this);
return TRACE_RETURN (c->check_struct (this) &&
likely (format == 0 || format == 1) &&
}
/* We only implement format 0 for now. */
- protected:
USHORT format; /* Format selector (=0/1). */
USHORT count; /* Number of name records. */
- Offset stringOffset; /* Offset to start of string storage (from start of table). */
+ Offset<> stringOffset; /* Offset to start of string storage (from start of table). */
NameRecord nameRecord[VAR]; /* The name records where count is the number of records. */
public:
DEFINE_SIZE_ARRAY (6, nameRecord);