ref: 1dd9288f90b604be6bc26559f628d914acd5bded
parent: 41936632e02a6bbf6a4a291afcf296995908830e
parent: 68ed36b2a74f252ea58f20f08e7adb5564e714ce
author: Simon Howard <fraggle+github@gmail.com>
date: Sun Apr 22 12:19:19 EDT 2018
Merge pull request #1019 from turol/const Fix some const correctness issues in doom-specific code
--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -331,7 +331,7 @@
static void EnableLoadingDisk(void)
{
- char *disk_lump_name;
+ const char *disk_lump_name;
if (show_diskicon)
{
@@ -483,7 +483,7 @@
//
int demosequence;
int pagetic;
-char *pagename;
+const char *pagename;
//
@@ -669,7 +669,7 @@
static char *GetGameName(char *gamename)
{
size_t i;
- char *deh_sub;
+ const char *deh_sub;
for (i=0; i<arrlen(banners); ++i)
{
@@ -927,7 +927,7 @@
for (i=0; i<arrlen(copyright_banners); ++i)
{
- char *deh_s;
+ const char *deh_s;
deh_s = DEH_String(copyright_banners[i]);
--- a/src/doom/d_player.h
+++ b/src/doom/d_player.h
@@ -132,7 +132,7 @@
int secretcount;
// Hint messages.
- char* message;
+ const char *message;
// For screen flashing (red or bright).
int damagecount;
--- a/src/doom/g_game.c
+++ b/src/doom/g_game.c
@@ -2113,9 +2113,9 @@
// G_PlayDemo
//
-char* defdemoname;
+static const char *defdemoname;
-void G_DeferedPlayDemo (char* name)
+void G_DeferedPlayDemo(const char *name)
{
defdemoname = name;
gameaction = ga_playdemo;
--- a/src/doom/g_game.h
+++ b/src/doom/g_game.h
@@ -37,7 +37,7 @@
// but a warp test can start elsewhere
void G_DeferedInitNew (skill_t skill, int episode, int map);
-void G_DeferedPlayDemo (char* demo);
+void G_DeferedPlayDemo (const char* demo);
// Can be called by the startup code or M_Responder,
// calls P_SetupLevel or W_EnterWorld.
--- a/src/doom/p_saveg.c
+++ b/src/doom/p_saveg.c
@@ -184,7 +184,7 @@
return (void *) (intptr_t) saveg_read32();
}
-static void saveg_writep(void *p)
+static void saveg_writep(const void *p)
{
saveg_write32((intptr_t) p);
}