Skip to content

Commit 8fa3e48

Browse files
committed
issue issue cleanup
1 parent 2b37cc2 commit 8fa3e48

4 files changed

Lines changed: 21 additions & 21 deletions

File tree

include/billboard.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ typedef struct billboard* Billboard;
99
Billboard BillboardCreate(Texture sprite, int posX, int posY, int size);
1010
void BillboardDestroy(Billboard* bp);
1111

12-
Texture BillboardGetTexture(Billboard bb);
12+
Texture BillboardGetTexture(const struct billboard* bb);
1313

14-
int BillboardGetX(Billboard bb);
15-
int BillboardGetY(Billboard bb);
16-
int BillboardGetSize(Billboard bb);
14+
int BillboardGetX(const struct billboard* bb);
15+
int BillboardGetY(const struct billboard* bb);
16+
int BillboardGetSize(const struct billboard* bb);
1717

18-
int BillboardSetX(Billboard bb, int posX);
19-
int BillboardSetY(Billboard bb, int posY);
18+
void BillboardSetX(Billboard bb, int posX);
19+
void BillboardSetY(Billboard bb, int posY);
2020

2121
#endif

src/billboard.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,37 +34,37 @@ void BillboardDestroy(Billboard* bbp) {
3434
*bbp = NULL;
3535
}
3636

37-
Texture BillboardGetTexture(const Billboard bb) {
37+
Texture BillboardGetTexture(const struct billboard* bb) {
3838
assert(bb != NULL);
3939

4040
return bb->sprite;
4141
}
4242

43-
int BillboardGetX(const Billboard bb) {
43+
int BillboardGetX(const struct billboard* bb) {
4444
assert(bb != NULL);
4545

4646
return bb->posX;
4747
}
4848

49-
int BillboardGetY(const Billboard bb) {
49+
int BillboardGetY(const struct billboard* bb) {
5050
assert(bb != NULL);
5151

5252
return bb->posY;
5353
}
5454

55-
int BillboardGetSize(const Billboard bb) {
55+
int BillboardGetSize(const struct billboard* bb) {
5656
assert(bb != NULL);
5757

5858
return bb->size;
5959
}
6060

61-
int BillboardSetX(Billboard bb, int posX) {
61+
void BillboardSetX(Billboard bb, int posX) {
6262
assert(bb != NULL);
6363

6464
bb->posX = posX;
6565
}
6666

67-
int BillboardSetY(Billboard bb, int posY) {
67+
void BillboardSetY(Billboard bb, int posY) {
6868
assert(bb != NULL);
6969

7070
bb->posX = posY;

src/hashmap.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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 HashMap map, void* key) {
121+
void* HashMapGet(const struct hashmap* map, void* key) {
122122
assert(map != NULL);
123123
assert(key != NULL);
124124

@@ -148,14 +148,14 @@ void* HashMapGet(const HashMap map, void* key) {
148148
}
149149

150150
// Returns whether or not the HashMap contains a value for the given key
151-
bool HashMapContains(const HashMap map, void* key) {
151+
bool HashMapContains(const struct hashmap* 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 HashMap map, void* key) {
158+
bool HashMapRemove(const struct hashmap* map, void* key) {
159159
assert(map != NULL);
160160

161161
// Get list index
@@ -187,7 +187,7 @@ bool HashMapRemove(const HashMap map, void* key) {
187187
}
188188

189189
// Removes an item from the HashMap, returning it
190-
void* HashMapPop(const HashMap map, void* key) {
190+
void* HashMapPop(const struct hashmap* map, void* key) {
191191
assert(map != NULL);
192192

193193
// Get list index
@@ -219,7 +219,7 @@ void* HashMapPop(const HashMap map, void* key) {
219219
}
220220

221221
// Prints the map in usual format. printFunc (optional) prints the item correctly)
222-
void HashMapPrint(const HashMap map, bool newline, void (*printFunc) (void* key, void* value)) {
222+
void HashMapPrint(const struct hashmap* map, bool newline, void (*printFunc) (void* key, void* value)) {
223223
assert(map != NULL);
224224

225225
if (printFunc == NULL) {
@@ -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 HashMapIterator iter) {
307+
bool HashMapIterCanOperate(const struct hashmapi* iter) {
308308
assert(iter != NULL);
309309
assert(iter->map != NULL);
310310

src/linkedlist.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,14 +398,14 @@ void* ListGetCurrent(List list) {
398398
}
399399

400400
// Returns whether or not the list has a next element
401-
bool ListHasNext(const List list) {
401+
bool ListHasNext(const struct list* list) {
402402
assert(list != NULL);
403403

404404
return list->currentNode->nextNode != NULL;
405405
}
406406

407407
// Returns whether or not its safe to operate in the current list node
408-
bool ListCanOperate(const List list) {
408+
bool ListCanOperate(const struct list* list) {
409409
assert(list != NULL);
410410

411411
return list->currentNode != NULL;
@@ -449,7 +449,7 @@ void ListPrint(List list, bool newline, void (*printFunc) (void* item)) {
449449
}
450450
}
451451

452-
int ListGetSize(const List list) {
452+
int ListGetSize(const struct list* list) {
453453
assert(list != NULL);
454454

455455
return list->size;

0 commit comments

Comments
 (0)