Parcourir la source

Removed const qualifiers from SDL_CreateHashTable() parameter types

Petar Popovic il y a 6 mois
Parent
commit
f4cea5e019
2 fichiers modifiés avec 11 ajouts et 9 suppressions
  1. 6 4
      src/SDL_hashtable.c
  2. 5 5
      src/SDL_hashtable.h

+ 6 - 4
src/SDL_hashtable.c

@@ -55,10 +55,12 @@ struct SDL_HashTable
     bool stackable;
 };
 
-SDL_HashTable *SDL_CreateHashTable(void *data, const Uint32 num_buckets, const SDL_HashTable_HashFn hashfn,
-                                   const SDL_HashTable_KeyMatchFn keymatchfn,
-                                   const SDL_HashTable_NukeFn nukefn,
-                                   const bool stackable)
+SDL_HashTable *SDL_CreateHashTable(void *data,
+                                   Uint32 num_buckets,
+                                   SDL_HashTable_HashFn hashfn,
+                                   SDL_HashTable_KeyMatchFn keymatchfn,
+                                   SDL_HashTable_NukeFn nukefn,
+                                   bool stackable)
 {
     SDL_HashTable *table;
 

+ 5 - 5
src/SDL_hashtable.h

@@ -30,11 +30,11 @@ typedef bool (*SDL_HashTable_KeyMatchFn)(const void *a, const void *b, void *dat
 typedef void (*SDL_HashTable_NukeFn)(const void *key, const void *value, void *data);
 
 extern SDL_HashTable *SDL_CreateHashTable(void *data,
-                                          const Uint32 num_buckets,
-                                          const SDL_HashTable_HashFn hashfn,
-                                          const SDL_HashTable_KeyMatchFn keymatchfn,
-                                          const SDL_HashTable_NukeFn nukefn,
-                                          const bool stackable);
+                                          Uint32 num_buckets,
+                                          SDL_HashTable_HashFn hashfn,
+                                          SDL_HashTable_KeyMatchFn keymatchfn,
+                                          SDL_HashTable_NukeFn nukefn,
+                                          bool stackable);
 
 extern void SDL_EmptyHashTable(SDL_HashTable *table);
 extern void SDL_DestroyHashTable(SDL_HashTable *table);