From d2279a204f4452ac88a08eec07958fea7a70e549 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 27 Jan 2023 12:32:55 -0700 Subject: [PATCH] [gsubgpos] Avoid a copy into the vector --- src/hb-ot-layout-gsubgpos.hh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index ad7537a73..089fa57f3 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -957,17 +957,15 @@ struct hb_accelerate_subtables_context_t : template return_t dispatch (const T &obj) { - hb_applicable_t entry; + hb_applicable_t *entry = array.push (); - entry.init (obj, - apply_to + entry->init (obj, + apply_to #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE - , apply_cached_to - , cache_func_to + , apply_cached_to + , cache_func_to #endif - ); - - array.push (entry); + ); #ifndef HB_NO_OT_LAYOUT_LOOKUP_CACHE /* Cache handling