From 31258e9536c81bd934052239f5f33aabc807c42e Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Mon, 29 Jul 2024 10:22:54 +0200 Subject: [PATCH] Constify type_size array --- Quake/pr_edict.c | 2 +- Quake/progs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Quake/pr_edict.c b/Quake/pr_edict.c index ca95ce6c6..3e2abc071 100644 --- a/Quake/pr_edict.c +++ b/Quake/pr_edict.c @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern edict_t **bbox_linked; -int type_size[8] = { +extern const int type_size[8] = { 1, // ev_void 1, // sizeof(string_t) / 4 // ev_string 1, // ev_float diff --git a/Quake/progs.h b/Quake/progs.h index c3b27134b..d8071c6f6 100644 --- a/Quake/progs.h +++ b/Quake/progs.h @@ -373,7 +373,7 @@ int SAVE_NUM_FOR_EDICT (savedata_t *save, edict_t *e); #define E_VECTOR(e,o) (&((float*)&e->v)[o]) #define E_STRING(e,o) (PR_GetString(*(string_t *)&((float*)&e->v)[o])) -extern int type_size[8]; +extern const int type_size[8]; typedef struct builtindef_s {