From a53d301b1c9f72cb42cc0fc321e2ad4dbac8e064 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 23 Oct 2018 23:05:55 -0700 Subject: [PATCH] [name] Minor --- src/hb-ot-name-table.hh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hb-ot-name-table.hh b/src/hb-ot-name-table.hh index be9c5e365..9b2835529 100644 --- a/src/hb-ot-name-table.hh +++ b/src/hb-ot-name-table.hh @@ -156,7 +156,7 @@ struct name { const hb_array_t all_names (nameRecordZ.arrayZ, count); const NameRecord &record = all_names[idx]; - return hb_bytes_t ((char *) this + stringOffset + record.offset, record.length); + return hb_bytes_t ((const char *) (this+stringOffset).arrayZ + record.offset, record.length); } inline unsigned int get_size (void) const @@ -164,7 +164,7 @@ struct name inline bool sanitize_records (hb_sanitize_context_t *c) const { TRACE_SANITIZE (this); - char *string_pool = (char *) this + stringOffset; + const void *string_pool = (this+stringOffset).arrayZ; unsigned int _count = count; /* Move to run-time?! */ for (unsigned int i = 0; i < _count; i++) @@ -256,7 +256,8 @@ struct name /* We only implement format 0 for now. */ HBUINT16 format; /* Format selector (=0/1). */ HBUINT16 count; /* Number of name records. */ - Offset16 stringOffset; /* Offset to start of string storage (from start of table). */ + OffsetTo, HBUINT16, false> + stringOffset; /* Offset to start of string storage (from start of table). */ UnsizedArrayOf nameRecordZ; /* The name records where count is the number of records. */ public: