Improve usage of file_id

This commit is contained in:
gingerBill
2021-11-15 17:26:01 +00:00
parent f55fc4cd08
commit e814a3693f
9 changed files with 75 additions and 30 deletions

View File

@@ -24,7 +24,9 @@ template <typename T> void ptr_set_reserve(PtrSet<T> *h, isize cap);
template <typename T>
void ptr_set_init(PtrSet<T> *s, gbAllocator a, isize capacity) {
capacity = next_pow2_isize(gb_max(16, capacity));
if (capacity != 0) {
capacity = next_pow2_isize(gb_max(16, capacity));
}
slice_init(&s->hashes, a, capacity);
array_init(&s->entries, a, 0, capacity);