foxygit / doom Log in
commit 475b0601c85983be8bdc8c6c32d9564ad120a371
Author:     Turo Lamminen <turotl@gmail.com>
AuthorDate: Tue Apr 24 19:41:27 2018 +0300
Commit:     Turo Lamminen <turotl@gmail.com>
CommitDate: Tue Apr 24 20:16:01 2018 +0300

    doom: Fix const correctness issue in intermission load/unload callbacks
---
 src/doom/wi_stuff.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/doom/wi_stuff.c b/src/doom/wi_stuff.c
index cff0d9ac..1bfbcb2b 100644
--- a/src/doom/wi_stuff.c
+++ b/src/doom/wi_stuff.c
@@ -1552,7 +1552,7 @@ void WI_Ticker(void)

 }

-typedef void (*load_callback_t)(char *lumpname, patch_t **variable);
+typedef void (*load_callback_t)(const char *lumpname, patch_t **variable);

 // Common load/unload function.  Iterates over all the graphics
 // lumps to be loaded/unloaded into memory.
@@ -1707,7 +1707,7 @@ static void WI_loadUnloadData(load_callback_t callback)
     callback(name, &background);
 }

-static void WI_loadCallback(char *name, patch_t **variable)
+static void WI_loadCallback(const char *name, patch_t **variable)
 {
     *variable = W_CacheLumpName(name, PU_STATIC);
 }
@@ -1738,7 +1738,7 @@ void WI_loadData(void)
     bstar = W_CacheLumpName(DEH_String("STFDEAD0"), PU_STATIC);
 }

-static void WI_unloadCallback(char *name, patch_t **variable)
+static void WI_unloadCallback(const char *name, patch_t **variable)
 {
     W_ReleaseLumpName(name);
     *variable = NULL;