From 92e5933ee6c6382ea168ee5fdd30d80cece131d1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 31 Dec 2022 12:35:30 -0700 Subject: [PATCH] [vector] A couple more exact-size allocations --- src/hb-ot-name-table.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-name-table.hh b/src/hb-ot-name-table.hh index 6f4461cc1..bbf58172e 100644 --- a/src/hb-ot-name-table.hh +++ b/src/hb-ot-name-table.hh @@ -425,7 +425,7 @@ struct name hb_vector_t insert_name_records; if (!name_table_overrides->is_empty ()) { - if (unlikely (!insert_name_records.alloc (name_table_overrides->get_population ()))) + if (unlikely (!insert_name_records.alloc (name_table_overrides->get_population (), true))) return_trace (false); for (const auto& record_ids : name_table_overrides->keys ()) { @@ -475,7 +475,7 @@ struct name const hb_array_t all_names (this->table->nameRecordZ.arrayZ, this->table->count); - this->names.alloc (all_names.length); + this->names.alloc (all_names.length, true); for (unsigned int i = 0; i < all_names.length; i++) {