shithub: choc

Download patch

ref: 475b0601c85983be8bdc8c6c32d9564ad120a371
parent: cd852bc9d25bed934c73e965036ebd1eb5712875
author: Turo Lamminen <[email protected]>
date: Tue Apr 24 15:41:27 EDT 2018

doom: Fix const correctness issue in intermission load/unload callbacks

--- a/src/doom/wi_stuff.c
+++ b/src/doom/wi_stuff.c
@@ -1552,7 +1552,7 @@
 
 }
 
-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 @@
     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 @@
     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;