[set] Make array access more explicit

Follow up on 94e421abbf
This commit is contained in:
Behdad Esfahbod 2018-10-25 16:35:36 -07:00
parent e3ceb2dde3
commit 64c32edfe1
1 changed files with 3 additions and 1 deletions

View File

@ -669,7 +669,9 @@ struct hb_set_t
return nullptr;
pages[map.index].init0 ();
memmove (&page_map[i] + 1, &page_map[i], (page_map.len - 1 - i) * sizeof (page_map[0]));
memmove (page_map.arrayZ() + i + 1,
page_map.arrayZ() + i,
(page_map.len - 1 - i) * sizeof (page_map[0]));
page_map[i] = map;
}
return &pages[page_map[i].index];