From 13a00f19763207f7e7334f52dc8a5d88d298dd9b Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Sat, 23 Dec 2023 00:07:55 +0100 Subject: [PATCH] Make `keynames` array static const --- Quake/keys.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Quake/keys.c b/Quake/keys.c index 593a89297..57a6b9fd5 100644 --- a/Quake/keys.c +++ b/Quake/keys.c @@ -52,7 +52,7 @@ typedef struct int keynum; } keyname_t; -keyname_t keynames[] = +static const keyname_t keynames[] = { {"TAB", K_TAB}, {"ENTER", K_ENTER}, @@ -630,7 +630,7 @@ the K_* names are matched up. */ int Key_StringToKeynum (const char *str) { - keyname_t *kn; + const keyname_t *kn; if (!str || !str[0]) return -1; @@ -657,7 +657,7 @@ FIXME: handle quote special (general escape sequence?) const char *Key_KeynumToString (int keynum) { static char tinystr[128][2]; - keyname_t *kn; + const keyname_t *kn; if (keynum == -1) return "";