Browse Source

Remove HashKey usage for `PtrMap` calls

gingerBill 3 years ago
parent
commit
c38d6dc959
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/ptr_map.cpp

+ 4 - 4
src/ptr_map.cpp

@@ -237,7 +237,7 @@ gb_inline void map_clear(PtrMap<K, V> *h) {
 
 
 #if PTR_MAP_ENABLE_MULTI_MAP
 #if PTR_MAP_ENABLE_MULTI_MAP
 template <typename K, typename V>
 template <typename K, typename V>
-PtrMapEntry<K, V> *multi_map_find_first(PtrMap<K, V> *h, HashKey const &key) {
+PtrMapEntry<K, V> *multi_map_find_first(PtrMap<K, V> *h, K key) {
 	isize i = map__find(h, key).entry_index;
 	isize i = map__find(h, key).entry_index;
 	if (i == MAP_SENTINEL) {
 	if (i == MAP_SENTINEL) {
 		return nullptr;
 		return nullptr;
@@ -258,7 +258,7 @@ PtrMapEntry<K, V> *multi_map_find_next(PtrMap<K, V> *h, PtrMapEntry<K, V> *e) {
 }
 }
 
 
 template <typename K, typename V>
 template <typename K, typename V>
-isize multi_map_count(PtrMap<K, V> *h, HashKey const &key) {
+isize multi_map_count(PtrMap<K, V> *h, K key) {
 	isize count = 0;
 	isize count = 0;
 	PtrMapEntry<K, V> *e = multi_map_find_first(h, key);
 	PtrMapEntry<K, V> *e = multi_map_find_first(h, key);
 	while (e != nullptr) {
 	while (e != nullptr) {
@@ -302,7 +302,7 @@ void multi_map_insert(PtrMap<K, V> *h, K key, V const &value) {
 }
 }
 
 
 template <typename K, typename V>
 template <typename K, typename V>
-void multi_map_remove(PtrMap<K, V> *h, HashKey const &key, PtrMapEntry<K, V> *e) {
+void multi_map_remove(PtrMap<K, V> *h, K key, PtrMapEntry<K, V> *e) {
 	MapFindResult fr = map__find_from_entry(h, e);
 	MapFindResult fr = map__find_from_entry(h, e);
 	if (fr.entry_index != MAP_SENTINEL) {
 	if (fr.entry_index != MAP_SENTINEL) {
 		map__erase(h, fr);
 		map__erase(h, fr);
@@ -310,7 +310,7 @@ void multi_map_remove(PtrMap<K, V> *h, HashKey const &key, PtrMapEntry<K, V> *e)
 }
 }
 
 
 template <typename K, typename V>
 template <typename K, typename V>
-void multi_map_remove_all(PtrMap<K, V> *h, HashKey const &key) {
+void multi_map_remove_all(PtrMap<K, V> *h, K key) {
 	while (map_get(h, key) != nullptr) {
 	while (map_get(h, key) != nullptr) {
 		map_remove(h, key);
 		map_remove(h, key);
 	}
 	}