add missing const
If you want to declare a pointer which the address pointed to is constant, you should declare it as like `static const char *const var = "...";`. This commit supplies missing `const` and prevents some programming error in the future.
This commit is contained in:
@@ -2687,7 +2687,7 @@ static const char *type_to_name(int);
|
||||
static void error4(int, int, int, int, int, int);
|
||||
|
||||
static int bad_count[MAX_TYPE]; /* count of positions flagged as bad */
|
||||
static const char *type_names[MAX_TYPE] = {
|
||||
static const char *const type_names[MAX_TYPE] = {
|
||||
"STONE", "VWALL", "HWALL", "TLCORNER", "TRCORNER", "BLCORNER", "BRCORNER",
|
||||
"CROSSWALL", "TUWALL", "TDWALL", "TLWALL", "TRWALL", "DBWALL", "TREE",
|
||||
"SDOOR", "SCORR", "POOL", "MOAT", "WATER", "DRAWBRIDGE_UP", "LAVAPOOL",
|
||||
|
||||
Reference in New Issue
Block a user