From f7e9649be466ea03f556e2918063c5a4d0d28e2e Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 12 Dec 2017 18:21:40 +0000 Subject: Disable struct field reordering (for the time being) --- src/map.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/map.cpp') diff --git a/src/map.cpp b/src/map.cpp index 152b8cb39..0ff39cac6 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -127,14 +127,12 @@ template void multi_map_remove_all(Map *h, HashKey key); template gb_inline void map_init(Map *h, gbAllocator a, isize capacity) { array_init(&h->hashes, a, capacity); - array_init(&h->entries, a, capacity); -} + array_init(&h->entries, a, capacity);} template gb_inline void map_destroy(Map *h) { array_free(&h->entries); - array_free(&h->hashes); -} + array_free(&h->hashes);} template gb_internal isize map__add_entry(Map *h, HashKey key) { @@ -237,8 +235,9 @@ template void map_set(Map *h, HashKey key, T const &value) { isize index; MapFindResult fr; - if (h->hashes.count == 0) + if (h->hashes.count == 0) { map_grow(h); + } fr = map__find(h, key); if (fr.entry_index >= 0) { index = fr.entry_index; -- cgit v1.2.3