Make TXT_NewDropdownList values parameter const

This commit is contained in:
Turo Lamminen 2018-03-27 19:28:43 +03:00
parent 0c4fe5bbe5
commit fccdde81b5
5 changed files with 16 additions and 16 deletions

View file

@ -59,7 +59,7 @@ static const iwad_t fallback_iwads[] = {
// Array of IWADs found to be installed
static const iwad_t **found_iwads;
static char **iwad_labels;
static const char **iwad_labels;
// Index of the currently selected IWAD
@ -71,49 +71,49 @@ static char *iwadfile;
static const char *wad_extensions[] = { "wad", "lmp", "deh", NULL };
static char *doom_skills[] =
static const char *doom_skills[] =
{
"I'm too young to die.", "Hey, not too rough.", "Hurt me plenty.",
"Ultra-Violence.", "NIGHTMARE!",
};
static char *chex_skills[] =
static const char *chex_skills[] =
{
"Easy does it", "Not so sticky", "Gobs of goo", "Extreme ooze",
"SUPER SLIMEY!"
};
static char *heretic_skills[] =
static const char *heretic_skills[] =
{
"Thou needeth a wet-nurse", "Yellowbellies-R-us", "Bringest them oneth",
"Thou art a smite-meister", "Black plague possesses thee"
};
static char *hexen_fighter_skills[] =
static const char *hexen_fighter_skills[] =
{
"Squire", "Knight", "Warrior", "Berserker", "Titan"
};
static char *hexen_cleric_skills[] =
static const char *hexen_cleric_skills[] =
{
"Altar boy", "Acolyte", "Priest", "Cardinal", "Pope"
};
static char *hexen_mage_skills[] =
static const char *hexen_mage_skills[] =
{
"Apprentice", "Enchanter", "Sorceror", "Warlock", "Archimage"
};
static char *strife_skills[] =
static const char *strife_skills[] =
{
"Training", "Rookie", "Veteran", "Elite", "Bloodbath"
};
static char *character_classes[] = { "Fighter", "Cleric", "Mage" };
static const char *character_classes[] = { "Fighter", "Cleric", "Mage" };
static char *gamemodes[] = { "Co-operative", "Deathmatch", "Deathmatch 2.0" };
static const char *gamemodes[] = { "Co-operative", "Deathmatch", "Deathmatch 2.0" };
static char *strife_gamemodes[] =
static const char *strife_gamemodes[] =
{
"Normal deathmatch",
"Items respawn", // (altdeath)

View file

@ -34,7 +34,7 @@ typedef enum
NUM_OPLMODES,
} oplmode_t;
static char *opltype_strings[] =
static const char *opltype_strings[] =
{
"OPL2",
"OPL3"

View file

@ -88,7 +88,7 @@ void CloseWindow(TXT_UNCAST_ARG(button), void *user_data)
void UnicodeWindow(TXT_UNCAST_ARG(widget), void *user_data)
{
static char *strings[] = {
static const char *strings[] = {
"lunedì", "martedì", "mercoledì", "giovedì",
"venerdì", "sabato", "domenica",
};

View file

@ -288,7 +288,7 @@ txt_widget_class_t txt_dropdown_list_class =
NULL,
};
txt_dropdown_list_t *TXT_NewDropdownList(int *variable, char **values,
txt_dropdown_list_t *TXT_NewDropdownList(int *variable, const char **values,
int num_values)
{
txt_dropdown_list_t *list;

View file

@ -43,7 +43,7 @@ struct txt_dropdown_list_s
{
txt_widget_t widget;
int *variable;
char **values;
const char **values;
int num_values;
};
@ -62,7 +62,7 @@ struct txt_dropdown_list_s
*/
txt_dropdown_list_t *TXT_NewDropdownList(int *variable,
char **values, int num_values);
const char **values, int num_values);
#endif /* #ifndef TXT_DROPDOWN_H */