Refactoring patch by DevHC

This commit is contained in:
Thilo Schulz 2011-03-05 19:20:37 +00:00
parent 21668c0616
commit fef4d12d68
31 changed files with 60 additions and 98 deletions

View file

@ -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 );
}