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:
SHIRAKATA Kentaro
2021-10-28 00:27:03 +09:00
committed by PatR
parent 893d11f7d5
commit cf810630de
28 changed files with 60 additions and 60 deletions

View File

@@ -1185,13 +1185,13 @@ raceptr(struct monst* mtmp)
return mtmp->data;
}
static const char *levitate[4] = { "float", "Float", "wobble", "Wobble" };
static const char *flys[4] = { "fly", "Fly", "flutter", "Flutter" };
static const char *flyl[4] = { "fly", "Fly", "stagger", "Stagger" };
static const char *slither[4] = { "slither", "Slither", "falter", "Falter" };
static const char *ooze[4] = { "ooze", "Ooze", "tremble", "Tremble" };
static const char *immobile[4] = { "wiggle", "Wiggle", "pulsate", "Pulsate" };
static const char *crawl[4] = { "crawl", "Crawl", "falter", "Falter" };
static const char *const levitate[4] = { "float", "Float", "wobble", "Wobble" };
static const char *const flys[4] = { "fly", "Fly", "flutter", "Flutter" };
static const char *const flyl[4] = { "fly", "Fly", "stagger", "Stagger" };
static const char *const slither[4] = { "slither", "Slither", "falter", "Falter" };
static const char *const ooze[4] = { "ooze", "Ooze", "tremble", "Tremble" };
static const char *const immobile[4] = { "wiggle", "Wiggle", "pulsate", "Pulsate" };
static const char *const crawl[4] = { "crawl", "Crawl", "falter", "Falter" };
const char *
locomotion(const struct permonst* ptr, const char* def)