Allow duplicate keys in HashMap

This commit is contained in:
Stephen Seo 2019-02-12 17:40:52 +09:00
parent 6801cc9744
commit c335b280c9

View file

@ -90,8 +90,6 @@ void* UDPC_HashMap_insert(UDPC_HashMap *hm, uint32_t key, void *data)
} }
} }
UDPC_HashMap_remove(hm, key);
uint32_t hash = UDPC_HASH32(key) % hm->capacity; uint32_t hash = UDPC_HASH32(key) % hm->capacity;
char *temp = malloc(sizeof(uint32_t) + hm->unitSize); char *temp = malloc(sizeof(uint32_t) + hm->unitSize);