From 9552955e081f3d871765055fd5abad9070cfcf90 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 3 Jun 2022 01:33:01 -0600 Subject: [PATCH] Add an unlikely --- src/hb-ot-cmap-table.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-ot-cmap-table.hh b/src/hb-ot-cmap-table.hh index 9d95f518c..24d548a2a 100644 --- a/src/hb-ot-cmap-table.hh +++ b/src/hb-ot-cmap-table.hh @@ -1485,7 +1485,7 @@ struct SubtableUnicodesCache { hb_set_t* set_for(const EncodingRecord* record) { if (!cached_unicodes.has ((intptr_t) record)) { - if (!cached_unicodes.set ((intptr_t) record, hb::unique_ptr {hb_set_create ()})) + if (unlikely (!cached_unicodes.set ((intptr_t) record, hb::unique_ptr {hb_set_create ()}))) return hb_set_get_empty (); (base+record->subtable).collect_unicodes (cached_unicodes.get ((intptr_t) record)); }