From 965372c7bf8778c9002a8678ff4585643de5193a Mon Sep 17 00:00:00 2001 From: jonny-vb Date: Fri, 15 Dec 2023 03:32:47 -0800 Subject: [PATCH] Fix warnings in input.c, map.c (const char, sqrt) --- include/map.h | 2 +- src/input.c | 2 ++ src/map.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/map.h b/include/map.h index 8c6dc0f..2468ca1 100644 --- a/include/map.h +++ b/include/map.h @@ -39,7 +39,7 @@ void updateBlockSizePx(); // search and load map by name in storedMaps[] (map.c) // stops program when map not found! -void loadMapByName(char *name); +void loadMapByName(const char *name); //load map by passed definition diff --git a/src/input.c b/src/input.c index c1adfff..9a38cf9 100644 --- a/src/input.c +++ b/src/input.c @@ -1,3 +1,5 @@ +#include + #include "input.h" #include "common.h" #include "SDL.h" diff --git a/src/map.c b/src/map.c index 879c3c0..a35cc62 100644 --- a/src/map.c +++ b/src/map.c @@ -130,7 +130,7 @@ void updateBlockSizePx(){ //=========================== // search and load map by name in storedMaps[] (map.c) // stops program when map not found! -void loadMapByName(char *name) +void loadMapByName(const char *name) { // loop through all stored maps for (int i = 0; i < storedMapsCount; i++)