[gamecode] Remove PR_Opcode_Init

It was idempotent, then it became impotent. Now it's just not needed.
This commit is contained in:
Bill Currie 2022-01-07 19:25:34 +09:00
parent 7e303a1151
commit 14d95f81d1
5 changed files with 0 additions and 13 deletions

View file

@ -632,8 +632,6 @@ typedef struct opcode_s {
extern const opcode_t pr_opcodes[512];
const opcode_t *PR_Opcode (pr_ushort_t opcode) __attribute__((const));
void PR_Opcode_Init (void); // idempotent
typedef struct dstatement_s {
pr_opcode_e op:16; // will be pr_opcode_v6p_e for older progs
pr_ushort_t a,b,c;

View file

@ -479,7 +479,6 @@ PR_Init_Cvars (void)
VISIBLE void
PR_Init (progs_t *pr)
{
PR_Opcode_Init (); // idempotent
PR_Resources_Init (pr);
PR_Strings_Init (pr);
PR_Debug_Init (pr);

View file

@ -1520,11 +1520,6 @@ PR_v6p_Opcode (pr_ushort_t opcode)
return &pr_v6p_opcodes[opcode];
}
VISIBLE void
PR_Opcode_Init (void)
{
}
static inline void
check_branch (progs_t *pr, dstatement_t *st, const v6p_opcode_t *op, short offset)
{

View file

@ -142,10 +142,6 @@ init_qf (void)
Cvar_Get ("pr_debug", "2", 0, 0, 0);
Cvar_Get ("pr_boundscheck", "0", 0, 0, 0);
// Normally, this is done by PR_Init, but PR_Init is not called in the main
// thread. However, PR_Opcode_Init() is idempotent.
PR_Opcode_Init ();
}
static void

View file

@ -139,7 +139,6 @@ opcode_init (void)
Hash_FlushTable (opcode_void_table);
Hash_FlushTable (opcode_type_table);
} else {
PR_Opcode_Init ();
opcode_type_table = Hash_NewTable (1021, 0, 0, 0, 0);
Hash_SetHashCompare (opcode_type_table, get_hash, compare);
opcode_void_table = Hash_NewTable (1021, get_key, 0, 0, 0);