mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-18 01:08:16 +00:00
hashtable: SDL_IterateHashTable might as well provide both key and value.
And SDL_IterateHashTableKey is only necessary for stackable hashtables, since non-stackable ones can either iterate each unique key/value pair with SDL_IterateHashTable, or get a specific key/value pair by using SDL_FindInHashTable.
This commit is contained in:
@@ -42,8 +42,11 @@ SDL_bool SDL_RemoveFromHashTable(SDL_HashTable *table, const void *key);
|
||||
SDL_bool SDL_FindInHashTable(const SDL_HashTable *table, const void *key, const void **_value);
|
||||
SDL_bool SDL_HashTableEmpty(SDL_HashTable *table);
|
||||
|
||||
SDL_bool SDL_IterateHashTable(const SDL_HashTable *table, const void *key, const void **_value, void **iter);
|
||||
SDL_bool SDL_IterateHashTableKeys(const SDL_HashTable *table, const void **_key, void **iter);
|
||||
// iterate all values for a specific key. This only makes sense if the hash is stackable. If not-stackable, just use SDL_FindInHashTable().
|
||||
SDL_bool SDL_IterateHashTableKey(const SDL_HashTable *table, const void *key, const void **_value, void **iter);
|
||||
|
||||
// iterate all key/value pairs in a hash (stackable hashes can have duplicate keys with multiple values).
|
||||
SDL_bool SDL_IterateHashTable(const SDL_HashTable *table, const void **_key, const void **_value, void **iter);
|
||||
|
||||
Uint32 SDL_HashString(const void *key, void *unused);
|
||||
SDL_bool SDL_KeyMatchString(const void *a, const void *b, void *unused);
|
||||
|
Reference in New Issue
Block a user