aboutsummaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-02-25 19:23:52 +0000
committergingerBill <bill@gingerbill.org>2018-02-25 19:23:52 +0000
commitd63885a495d2314a5ef76337605a9ebeefb26218 (patch)
treea47a575251d0be0020e3120e970e71ba55d3a651 /src/map.cpp
parentf28a34fa99d68ce54c76272385ff9c172cc2ae59 (diff)
`array_make`
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/map.cpp b/src/map.cpp
index a22b4c162..abc42231f 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -136,13 +136,15 @@ template <typename T> void multi_map_remove_all(Map<T> *h, HashKey key);
template <typename T>
gb_inline void map_init(Map<T> *h, gbAllocator a, isize capacity) {
- array_init(&h->hashes, a, capacity);
- array_init(&h->entries, a, capacity);}
+ array_init(&h->hashes, a, 0, capacity);
+ array_init(&h->entries, a, 0, capacity);
+}
template <typename T>
gb_inline void map_destroy(Map<T> *h) {
array_free(&h->entries);
- array_free(&h->hashes);}
+ array_free(&h->hashes);
+}
template <typename T>
gb_internal isize map__add_entry(Map<T> *h, HashKey key) {