shithub: choc

Download patch

ref: 5c28b4cd722fa8ebad86005c32c4618020fdee41
parent: f151ec4a6835eb0f953a7e7d69da5acf1f1d2206
author: Turo Lamminen <[email protected]>
date: Tue May 15 16:22:10 EDT 2018

strife: Fix const correctness in status bar load/unload callbacks

--- a/src/strife/st_stuff.c
+++ b/src/strife/st_stuff.c
@@ -1419,7 +1419,7 @@
     return true;
 }
 
-typedef void (*load_callback_t)(char *lumpname, patch_t **variable); 
+typedef void (*load_callback_t)(const char *lumpname, patch_t **variable);
 
 //
 // ST_loadUnloadGraphics
@@ -1483,7 +1483,7 @@
     callback(DEH_String("INVCURS"),  &invcursor);
 }
 
-static void ST_loadCallback(char *lumpname, patch_t **variable)
+static void ST_loadCallback(const char *lumpname, patch_t **variable)
 {
     *variable = W_CacheLumpName(lumpname, PU_STATIC);
 }
@@ -1502,7 +1502,7 @@
     ST_loadGraphics();
 }
 
-static void ST_unloadCallback(char *lumpname, patch_t **variable)
+static void ST_unloadCallback(const char *lumpname, patch_t **variable)
 {
     W_ReleaseLumpName(lumpname);
     *variable = NULL;