From ecaeaa29ec6f276af348ec3aa7f1d7098aa2d290 Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Wed, 12 Aug 2026 22:29:14 -0400 Subject: better naming --- set.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'set.c') diff --git a/set.c b/set.c index 5195276..e55c7c9 100644 --- a/set.c +++ b/set.c @@ -5,7 +5,7 @@ #define DEFAULT_CAPACITY 16 #define TOMBSTONE_VAL ((void*)-1) -#define IDX_VALID(set, idx) (idx < set->__num_buckets && set->__buckets[idx] != NULL) +#define IDX_FULL(set, idx) (idx < set->__num_buckets && set->__buckets[idx] != NULL) void set_init( set_t* set, @@ -62,7 +62,7 @@ static size_t fetch_set_idx( bool set_contains(const set_t* set, const void* key) { size_t idx = fetch_set_idx(set, key, false); - return IDX_VALID(set, idx); + return IDX_FULL(set, idx); } void* set_get(const set_t* set, const void* key) { @@ -99,7 +99,7 @@ static void rehash_set(set_t* set) { static size_t fetch_set_idx_rehashing(set_t* set, void* key) { size_t idx = fetch_set_idx(set, key, false); - if (IDX_VALID(set, idx)) return idx; + if (IDX_FULL(set, idx)) return idx; idx = fetch_set_idx(set, key, true); if ((double) ++set->size / set->__num_buckets > set->load_limit -- cgit v1.2.3