cf_map_del¶
Category: map
GitHub: cute_map.h
Removes an item from the map.
| Parameters | Description |
|---|---|
m |
The map. Can be NULL. Must be declared with CF_MAP(T). |
k |
The key for lookups. Keys are always typecast to uint64_t. |
Return Value¶
Returns 1 if the item was found and deleted, 0 if not found.
Code Example¶
Remove an item from the map.
CF_MAP(CF_V2) table = NULL;
map_set(table, 10, cf_v2(-1, 1));
map_del(table, 10);
CF_ASSERT(!map_has(table, 10));
map_free(table);
Related Pages¶
CF_MAP
cf_map_set
cf_map_get
cf_map_get_ptr
cf_map_has
cf_map_clear
cf_map_keys
cf_map_items
cf_map_swap
cf_map_size
cf_map_free