From 3703ca4df47134e0c274cf5096d14c9323331ff0 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 9 Dec 2017 18:11:36 +0000 Subject: Explicit procedure group; Remove implicit procedure overloading --- src/map.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/map.cpp') diff --git a/src/map.cpp b/src/map.cpp index 92840a480..152b8cb39 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -2,6 +2,8 @@ // with the use of the `multi_*` procedures. // TODO(bill): I should probably allow the `multi_map_*` stuff to be #ifdefed out +#define MAP_ENABLE_MULTI_MAP 1 + #ifndef MAP_UTIL_STUFF #define MAP_UTIL_STUFF // NOTE(bill): This util stuff is the same for every `Map` @@ -110,6 +112,7 @@ template void map_clear (Map *h); template void map_grow (Map *h); template void map_rehash (Map *h, isize new_count); +#if MAP_ENABLE_MULTI_MAP // Mutlivalued map procedure template MapEntry * multi_map_find_first(Map *h, HashKey key); template MapEntry * multi_map_find_next (Map *h, MapEntry *e); @@ -119,7 +122,7 @@ template void multi_map_get_all (Map *h, HashKey key, T *item template void multi_map_insert (Map *h, HashKey key, T const &value); template void multi_map_remove (Map *h, HashKey key, MapEntry *e); template void multi_map_remove_all(Map *h, HashKey key); - +#endif template gb_inline void map_init(Map *h, gbAllocator a, isize capacity) { @@ -291,7 +294,7 @@ gb_inline void map_clear(Map *h) { } -#if 1 +#if MAP_ENABLE_MULTI_MAP template MapEntry *multi_map_find_first(Map *h, HashKey key) { isize i = map__find(h, key).entry_index; -- cgit v1.2.3