Add an unlikely

This commit is contained in:
Behdad Esfahbod 2022-06-03 01:33:01 -06:00
parent 88f00ecb84
commit 9552955e08
1 changed files with 1 additions and 1 deletions

View File

@ -1485,7 +1485,7 @@ struct SubtableUnicodesCache {
hb_set_t* set_for(const EncodingRecord* record) hb_set_t* set_for(const EncodingRecord* record)
{ {
if (!cached_unicodes.has ((intptr_t) record)) { if (!cached_unicodes.has ((intptr_t) record)) {
if (!cached_unicodes.set ((intptr_t) record, hb::unique_ptr<hb_set_t> {hb_set_create ()})) if (unlikely (!cached_unicodes.set ((intptr_t) record, hb::unique_ptr<hb_set_t> {hb_set_create ()})))
return hb_set_get_empty (); return hb_set_get_empty ();
(base+record->subtable).collect_unicodes (cached_unicodes.get ((intptr_t) record)); (base+record->subtable).collect_unicodes (cached_unicodes.get ((intptr_t) record));
} }