From 29ad9304e2b0cd84fbf125dfa907cd20d141fc70 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 30 Jul 2023 17:06:25 -0600 Subject: [PATCH] [layout] Minor add prealloc --- src/hb-ot-layout.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index e6bd74b33..7ee48f800 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -1306,6 +1306,7 @@ hb_ot_layout_collect_features_map (hb_face_t *face, const OT::LangSys &l = g.get_script (script_index).get_lang_sys (language_index); unsigned int count = l.get_feature_indexes (0, nullptr, nullptr); + feature_map->alloc (count); for (unsigned int i = 0; i < count; i++) {