commit 708606ab83aee502a7c10dada1c25b47cb98fa1c
Author: Jonathan Dowland <jon@dow.land>
AuthorDate: Thu Feb 28 22:11:58 2019 +0000
Commit: Jonathan Dowland <jon@dow.land>
CommitDate: Thu Feb 28 22:16:25 2019 +0000
add const to const static arrays and members
pre-empting turol at Fabian's suggestion ;) Although I've gone one
const deeper than we seem to have elsewhere!
---
src/net_petname.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/net_petname.c b/src/net_petname.c
index 278da7ca..28ef52ea 100644
--- a/src/net_petname.c
+++ b/src/net_petname.c
@@ -21,7 +21,7 @@
#include "doomtype.h"
#include "m_misc.h"
-static char *adjectives[] = {
+static const char * const adjectives [] = {
"Grumpy",
"Ecstatic",
"Surly",
@@ -65,7 +65,7 @@ static char *adjectives[] = {
"Baby",
};
-static char *nouns[] = {
+static const char * const nouns[] = {
"Frad",
// Doom
"Cacodemon",
@@ -109,7 +109,7 @@ static void InitPetName()
char *NET_GetRandomPetName()
{
- char *a, *n;
+ const char *a, *n;
InitPetName();
a = adjectives[rand() % arrlen(adjectives)];