Refactoring patch by DevHC
This commit is contained in:
parent
21668c0616
commit
fef4d12d68
31 changed files with 60 additions and 98 deletions
|
@ -518,7 +518,7 @@ qboolean CG_ConsoleCommand( void ) {
|
|||
|
||||
cmd = CG_Argv(0);
|
||||
|
||||
for ( i = 0 ; i < sizeof( commands ) / sizeof( commands[0] ) ; i++ ) {
|
||||
for ( i = 0 ; i < ARRAY_LEN( commands ) ; i++ ) {
|
||||
if ( !Q_stricmp( cmd, commands[i].cmd ) ) {
|
||||
commands[i].function();
|
||||
return qtrue;
|
||||
|
@ -540,7 +540,7 @@ so it can perform tab completion
|
|||
void CG_InitConsoleCommands( void ) {
|
||||
int i;
|
||||
|
||||
for ( i = 0 ; i < sizeof( commands ) / sizeof( commands[0] ) ; i++ ) {
|
||||
for ( i = 0 ; i < ARRAY_LEN( commands ) ; i++ ) {
|
||||
trap_AddCommand( commands[i].cmd );
|
||||
}
|
||||
|
||||
|
|
|
@ -316,7 +316,7 @@ static cvarTable_t cvarTable[] = {
|
|||
// { &cg_pmove_fixed, "cg_pmove_fixed", "0", CVAR_USERINFO | CVAR_ARCHIVE }
|
||||
};
|
||||
|
||||
static int cvarTableSize = sizeof( cvarTable ) / sizeof( cvarTable[0] );
|
||||
static int cvarTableSize = ARRAY_LEN( cvarTable );
|
||||
|
||||
/*
|
||||
=================
|
||||
|
|
|
@ -44,7 +44,7 @@ static const orderTask_t validOrders[] = {
|
|||
{ VOICECHAT_FOLLOWFLAGCARRIER, TEAMTASK_ESCORT }
|
||||
};
|
||||
|
||||
static const int numValidOrders = sizeof(validOrders) / sizeof(orderTask_t);
|
||||
static const int numValidOrders = ARRAY_LEN(validOrders);
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
static int CG_ValidOrder(const char *p) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue