From 518f30e52307e12fe184c34f0da8f197b976ced5 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 14 Jan 2023 13:23:17 +0000 Subject: Bring `PtrMap` inline with `StringMap` --- src/string_map.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/string_map.cpp') diff --git a/src/string_map.cpp b/src/string_map.cpp index 067adef28..bf1bbf6ca 100644 --- a/src/string_map.cpp +++ b/src/string_map.cpp @@ -1,10 +1,5 @@ GB_STATIC_ASSERT(sizeof(MapIndex) == sizeof(u32)); -enum { - STRING_MAP_CACHE_LINE_SIZE_POW = 6, - STRING_MAP_CACHE_LINE_SIZE = 1< *h) { template gb_internal void string_map__resize_hashes(StringMap *h, usize count) { - h->hashes_count = cast(u32)resize_array_raw(&h->hashes, string_map_allocator(), h->hashes_count, count, STRING_MAP_CACHE_LINE_SIZE); + h->hashes_count = cast(u32)resize_array_raw(&h->hashes, string_map_allocator(), h->hashes_count, count, MAP_CACHE_LINE_SIZE); } template gb_internal void string_map__reserve_entries(StringMap *h, usize capacity) { - h->entries_capacity = cast(u32)resize_array_raw(&h->entries, string_map_allocator(), h->entries_capacity, capacity, STRING_MAP_CACHE_LINE_SIZE); + h->entries_capacity = cast(u32)resize_array_raw(&h->entries, string_map_allocator(), h->entries_capacity, capacity, MAP_CACHE_LINE_SIZE); } -- cgit v1.2.3