[bit-set] Micro-optimize access

This commit is contained in:
Behdad Esfahbod 2022-11-24 14:20:42 -07:00
parent d77f346d1a
commit 13dd4b464b
1 changed files with 2 additions and 2 deletions

View File

@ -939,7 +939,7 @@ struct hb_bit_set_t
{
auto &cached_page = page_map.arrayZ[i];
if (cached_page.major == major)
return &pages[cached_page.index];
return &pages.arrayZ[cached_page.index];
}
page_map_t key = {major};
@ -947,7 +947,7 @@ struct hb_bit_set_t
return nullptr;
last_page_lookup = i;
return &pages[page_map[i].index];
return &pages.arrayZ[page_map[i].index];
}
page_t &page_at (unsigned int i) { return pages[page_map[i].index]; }
const page_t &page_at (unsigned int i) const { return pages[page_map[i].index]; }