From cd18a78e924f262fda022cdaab1fc681cce42fec Mon Sep 17 00:00:00 2001 From: Fabrice Date: Wed, 11 Feb 2026 16:47:32 +0100 Subject: starting to upload fonts --- src/hash.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/hash.h') diff --git a/src/hash.h b/src/hash.h index f13c63d..bc8e22a 100644 --- a/src/hash.h +++ b/src/hash.h @@ -81,16 +81,18 @@ inline V* wayc_hashmap_insert(hashmap_s* map, const K* key, } template -inline V* wayc_hashmap_get(hashmap_s* map, const K* key) { +inline bool wayc_hashmap_get(hashmap_s* map, const K* key, V* out) { wayc_notnull(map); wayc_notnull(key); + wayc_notnull(out); hashentry_s entry{}; entry.key = *key; auto* stored = (hashentry_s*)hashmap_get(map->inner, &entry); - if (!stored) return nullptr; + if (!stored) return false; - return &stored->value; + *out = stored->value; + return true; } template -- cgit v1.2.3