[vector] Remove use of arrayZ() by using casts

This commit is contained in:
Behdad Esfahbod 2018-12-27 18:01:06 -05:00
parent fa333e34d6
commit 71da9ca62f
2 changed files with 2 additions and 2 deletions

View File

@ -231,7 +231,7 @@ struct name
const hb_ot_name_entry_t key = {name_id, {0}, language}; const hb_ot_name_entry_t key = {name_id, {0}, language};
const hb_ot_name_entry_t *entry = (const hb_ot_name_entry_t *) const hb_ot_name_entry_t *entry = (const hb_ot_name_entry_t *)
hb_bsearch (&key, hb_bsearch (&key,
this->names.arrayZ(), (const hb_ot_name_entry_t *) this->names,
this->names.length, this->names.length,
sizeof (key), sizeof (key),
_hb_ot_name_entry_cmp_key); _hb_ot_name_entry_cmp_key);

View File

@ -60,7 +60,7 @@ hb_ot_name_list_names (hb_face_t *face,
{ {
const OT::name_accelerator_t &name = *face->table.name; const OT::name_accelerator_t &name = *face->table.name;
if (num_entries) *num_entries = name.names.length; if (num_entries) *num_entries = name.names.length;
return name.names.arrayZ(); return (const hb_ot_name_entry_t *) name.names;
} }