From c783d36324dd1e2031d3387064afab1ce5d90b6f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 15 Oct 2018 23:28:49 -0700 Subject: [PATCH] [name] Pre-allocate array --- src/hb-ot-name-table.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hb-ot-name-table.hh b/src/hb-ot-name-table.hh index 3d7b73119..14ac4ef2c 100644 --- a/src/hb-ot-name-table.hh +++ b/src/hb-ot-name-table.hh @@ -170,6 +170,7 @@ struct name this->table->count); this->names.init (); + this->names.alloc (all_names.len); for (uint16_t i = 0; i < all_names.len; i++) {