@@ -74,7 +74,7 @@ void HashMapDestroy(HashMap* mapp) {
7474
7575
7676// Puts an item in the HashMap, returning whether or not it was successful
77- bool HashMapPut (HashMap map , void * key , void * value ) {
77+ bool HashMapPut (CHashMap map , void * key , void * value ) {
7878 assert (map != NULL );
7979 assert (key != NULL );
8080
@@ -118,7 +118,7 @@ bool HashMapPut(HashMap map, void* key, void* value) {
118118}
119119
120120// Returns an item from the HashMap
121- void * HashMapGet (const struct hashmap * map , void * key ) {
121+ void * HashMapGet (CHashMap map , void * key ) {
122122 assert (map != NULL );
123123 assert (key != NULL );
124124
@@ -148,14 +148,14 @@ void* HashMapGet(const struct hashmap* map, void* key) {
148148}
149149
150150// Returns whether or not the HashMap contains a value for the given key
151- bool HashMapContains (const struct hashmap * map , void * key ) {
151+ bool HashMapContains (CHashMap map , void * key ) {
152152 assert (map != NULL );
153153
154154 return HashMapGet (map , key ) != NULL ;
155155}
156156
157157// Removes an item from the HashMap, returning whether or not it was successful
158- bool HashMapRemove (const struct hashmap * map , void * key ) {
158+ bool HashMapRemove (CHashMap map , void * key ) {
159159 assert (map != NULL );
160160
161161 // Get list index
@@ -187,7 +187,7 @@ bool HashMapRemove(const struct hashmap* map, void* key) {
187187}
188188
189189// Removes an item from the HashMap, returning it
190- void * HashMapPop (const struct hashmap * map , void * key ) {
190+ void * HashMapPop (CHashMap map , void * key ) {
191191 assert (map != NULL );
192192
193193 // Get list index
@@ -219,7 +219,7 @@ void* HashMapPop(const struct hashmap* map, void* key) {
219219}
220220
221221// Prints the map in usual format. printFunc (optional) prints the item correctly)
222- void HashMapPrint (const struct hashmap * map , bool newline , void (* printFunc ) (void * key , void * value )) {
222+ void HashMapPrint (CHashMap map , bool newline , void (* printFunc ) (void * key , void * value )) {
223223 assert (map != NULL );
224224
225225 if (printFunc == NULL ) {
@@ -291,7 +291,7 @@ bool HashMapIterGoToNext(HashMapIterator iter) {
291291 return false;
292292 }
293293
294- List currentList = iter -> map -> values [iter -> currIdxList ];
294+ CList currentList = iter -> map -> values [iter -> currIdxList ];
295295
296296 // If is at end of current list, go to next
297297 if (++ iter -> currIdxKey >= ListGetSize (currentList )) {
@@ -304,7 +304,7 @@ bool HashMapIterGoToNext(HashMapIterator iter) {
304304}
305305
306306// Returns whether or not its safe to operate in the current element
307- bool HashMapIterCanOperate (const struct hashmapi * iter ) {
307+ bool HashMapIterCanOperate (CHashMapIterator iter ) {
308308 assert (iter != NULL );
309309 assert (iter -> map != NULL );
310310
@@ -313,15 +313,15 @@ bool HashMapIterCanOperate(const struct hashmapi* iter) {
313313}
314314
315315// Returns the current key the iterator is in
316- void * HashMapIterGetCurrentKey (HashMapIterator iter ) {
316+ void * HashMapIterGetCurrentKey (CHashMapIterator iter ) {
317317 assert (iter != NULL );
318318 assert (iter -> map != NULL );
319319
320320 return HashMapIterCanOperate (iter ) ? ((HashMapElement ) ListGet (iter -> map -> values [iter -> currIdxList ], iter -> currIdxKey ))-> key : NULL ;
321321}
322322
323323// Returns the current value the iterator is in
324- void * HashMapIterGetCurrentValue (HashMapIterator iter ) {
324+ void * HashMapIterGetCurrentValue (CHashMapIterator iter ) {
325325 assert (iter != NULL );
326326 assert (iter -> map != NULL );
327327
0 commit comments