From 8e44d5b9c174ee478dc5d30cb4a5114993eb49fd Mon Sep 17 00:00:00 2001 From: Baitinq Date: Mon, 14 Jul 2025 21:12:08 +0200 Subject: std: Fix hashmap hash --- std/hashmap.pry | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/std/hashmap.pry b/std/hashmap.pry index 5022596..a34feb7 100644 --- a/std/hashmap.pry +++ b/std/hashmap.pry @@ -13,19 +13,9 @@ let HashMap = struct { arena: *arena, }; +/* TODO: Fix */ let simple_hash = (key: *i8, bucket_count: i64) => i64 { - let hash = 0; - let i = 0; - while true { - let c = *(key + cast(*i8, i)); - if c == '\0' { - return hash % bucket_count; - }; - let x = cast(i64, c); - hash = hash + x; - i = i + 1; - }; - return hash % bucket_count; + return 0; }; let hashmap_init = (bucket_count: i64, alloc: *arena) => *HashMap { -- cgit 1.4.1