From 80b10f6fec8d65b173315fd674b6a14eabf7103e Mon Sep 17 00:00:00 2001 From: Tyge Løvset <60263450+tylov@users.noreply.github.com> Date: Thu, 2 Dec 2021 17:11:43 +0100 Subject: Update cmap_api.md --- docs/cmap_api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cmap_api.md b/docs/cmap_api.md index e4bc266a..51bcdcce 100644 --- a/docs/cmap_api.md +++ b/docs/cmap_api.md @@ -200,7 +200,7 @@ typedef struct { int x, y, z; } Vec3i; #define i_key Vec3i #define i_val int -#define i_cmp c_memcmp_equalto // bitwise compare, and use c_default_hash +#define i_equ c_memcmp_equalto // bitwise compare, and use c_default_hash #define i_tag vi #include @@ -275,7 +275,7 @@ static bool Viking_equalto(const Viking* a, const Viking* b) { } static uint32_t Viking_hash(const Viking* a, int ignored) { - return cstr_hash(&a->name) ^ (cstr_hash(&a->country) >> 15); + return c_strhash(a->name.str) ^ (c_strhash(a->country.str) >> 15); } static void Viking_del(Viking* v) { -- cgit v1.2.3