limit arguments to not support duplicate names

This commit is contained in:
2025-07-08 04:31:01 +01:00
parent 72cc87f5b6
commit fba074a5a4
7 changed files with 85 additions and 17 deletions

View File

@@ -41,7 +41,7 @@ void resize_hashmap_GC(struct hashmap_GC *t) {
}
}
int hashCode_GC(struct hashmap_GC *t, uint64_t hash) { return hash % t->size; }
int hashCode_GC(struct hashmap_GC *t, uint64_t hash) { return hash & (t->size - 1); }
int hashmap_remove_GC(struct hashmap_GC *t, uint64_t hash) {
int pos = hashCode_GC(t, hash);