From 965d43b6265afb823b791b4fd43fec585ad106ab Mon Sep 17 00:00:00 2001 From: Le <_@I-am-Le.me> Date: Sat, 2 Sep 2023 18:02:33 +0200 Subject: [PATCH] Use GROW_AT and SHRINK_AT everywhere They were forgotten in one spot. --- hashmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hashmap.c b/hashmap.c index 2685f6f..2c734e0 100644 --- a/hashmap.c +++ b/hashmap.c @@ -199,8 +199,8 @@ void hashmap_clear(struct hashmap *map, bool update_cap) { } memset(map->buckets, 0, map->bucketsz*map->nbuckets); map->mask = map->nbuckets-1; - map->growat = map->nbuckets*0.75; - map->shrinkat = map->nbuckets*0.10; + map->growat = map->nbuckets*GROW_AT; + map->shrinkat = map->nbuckets*SHRINK_AT; } static bool resize0(struct hashmap *map, size_t new_cap) {