diff options
| author | gingerBill <bill@gingerbill.org> | 2017-12-09 18:11:36 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-12-09 18:11:36 +0000 |
| commit | 3703ca4df47134e0c274cf5096d14c9323331ff0 (patch) | |
| tree | a01aab633bf3d25aba33357cb8d181537e9c841b /src/map.cpp | |
| parent | 41b8281c7355eea7c4a2022027769df8a519ae7a (diff) | |
Explicit procedure group; Remove implicit procedure overloading
Diffstat (limited to 'src/map.cpp')
| -rw-r--r-- | src/map.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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 <typename T> void map_clear (Map<T> *h); template <typename T> void map_grow (Map<T> *h); template <typename T> void map_rehash (Map<T> *h, isize new_count); +#if MAP_ENABLE_MULTI_MAP // Mutlivalued map procedure template <typename T> MapEntry<T> * multi_map_find_first(Map<T> *h, HashKey key); template <typename T> MapEntry<T> * multi_map_find_next (Map<T> *h, MapEntry<T> *e); @@ -119,7 +122,7 @@ template <typename T> void multi_map_get_all (Map<T> *h, HashKey key, T *item template <typename T> void multi_map_insert (Map<T> *h, HashKey key, T const &value); template <typename T> void multi_map_remove (Map<T> *h, HashKey key, MapEntry<T> *e); template <typename T> void multi_map_remove_all(Map<T> *h, HashKey key); - +#endif template <typename T> gb_inline void map_init(Map<T> *h, gbAllocator a, isize capacity) { @@ -291,7 +294,7 @@ gb_inline void map_clear(Map<T> *h) { } -#if 1 +#if MAP_ENABLE_MULTI_MAP template <typename T> MapEntry<T> *multi_map_find_first(Map<T> *h, HashKey key) { isize i = map__find(h, key).entry_index; |