Add hash map implementation
Release / release (push) Successful in 3s

This commit is contained in:
2026-09-24 00:52:34 +01:00
parent 68640dc5e2
commit 180292289d
14 changed files with 811 additions and 8 deletions
+4 -4
View File
@@ -73,16 +73,16 @@ typedef WpHashTable WpHashSet;
CAPACITY) \
hashSetAllocWithCustomHasher(ALLOCATOR_PTR, HASHER, U8_STREAM_ENCODER, ITEM_EQ_TEST, CAPACITY, \
sizeof(TYPE))
#define wpHashSetItems(TYPE, SET_PTR) ((TYPE *)hashTableKeys(SET_PTR, sizeof(TYPE)))
#define wpHashSetCapacity(SET_PTR) hashTableCapacity(SET_PTR)
#define wpHashSetCount(SET_PTR) hashTableCount(SET_PTR)
#define wpHashSetItemSize(SET_PTR) hashTableKeySize(SET_PTR)
#define wpHashSetFind(TYPE, SET_PTR, ITEM_PTR) hashSetFind(SET_PTR, ITEM_PTR, sizeof(TYPE))
#define wpHashSetInsertCapped(TYPE, SET_PTR, ITEM_PTR) \
hashSetInsertCapped(SET_PTR, ITEM_PTR, sizeof(TYPE))
#define wpHashSetInsertAlloc(TYPE, ALLOCATOR_PTR, SET_PTR, ITEM_PTR) \
hashSetInsertAlloc(ALLOCATOR_PTR, SET_PTR, ITEM_PTR, sizeof(TYPE))
#define wpHashSetRemove(TYPE, SET_PTR, ITEM_PTR) hashSetRemove(SET_PTR, ITEM_PTR, sizeof(TYPE))
#define wpHashSetItems(TYPE, SET_PTR) ((TYPE *)hashTableKeys(SET_PTR, sizeof(TYPE)))
#define wpHashSetCapacity(SET_PTR) hashTableCapacity(SET_PTR)
#define wpHashSetCount(SET_PTR) hashTableCount(SET_PTR)
#define wpHashSetItemSize(SET_PTR) hashTableKeySize(SET_PTR)
#define wpHashSetClear(TYPE, SET_PTR) hashTableClear(SET_PTR, sizeof(TYPE), 0)
#define wpHashSetDealloc(TYPE, ALLOCATOR_PTR, SET_PTR) \
hashTableDealloc(ALLOCATOR_PTR, SET_PTR, sizeof(TYPE), 0)