From 7243dd263dcfd4fb79e8eb139e1091fc735a48db Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 19 Sep 2024 15:26:26 +0200 Subject: [PATCH] style: noming env_utils --- output/src/hashmap/env/env_utils.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/output/src/hashmap/env/env_utils.c b/output/src/hashmap/env/env_utils.c index 2d9f53fd..9726310f 100644 --- a/output/src/hashmap/env/env_utils.c +++ b/output/src/hashmap/env/env_utils.c @@ -1,12 +1,12 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* hashmap_env_utils.c :+: :+: :+: */ +/* env_utils.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: maiboyer +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/12/06 10:58:20 by maiboyer #+# #+# */ -/* Updated: 2023/12/11 15:35:37 by maiboyer ### ########.fr */ +/* Updated: 2024/09/19 15:26:18 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,12 +16,11 @@ #include "me/types.h" #include -t_str *hmap_env_get(t_hashmap_env *hmap, - t_str *key) +t_str *hmap_env_get(t_hashmap_env *hmap, t_str *key) { - t_usize hashed_key; - t_entry_env *entry; - t_entry_env *prev; + t_usize hashed_key; + t_entry_env *entry; + t_entry_env *prev; hmap->hfunc(&hmap->hasher, key); hashed_key = hasher_reset_and_finish(&hmap->hasher); @@ -31,18 +30,18 @@ t_str *hmap_env_get(t_hashmap_env *hmap, return (&entry->kv.val); } -void hmap_env_remove(t_hashmap_env *hmap, t_str *key) +void hmap_env_remove(t_hashmap_env *hmap, t_str *key) { - t_usize hashed_key; - t_entry_env *prev; - t_entry_env *entry; + t_usize hashed_key; + t_entry_env *prev; + t_entry_env *entry; hmap->hfunc(&hmap->hasher, key); hashed_key = hasher_reset_and_finish(&hmap->hasher); prev = NULL; entry = hmap_env_get_entry(hmap, hashed_key, key, &prev); if (entry == NULL) - return; + return ; if (prev == NULL) hmap->buckets[hashed_key % hmap->num_buckets] = entry->next; else