Browse Source

engine: common: remove unused BaseCmd_Replace

pull/2/head
Alibek Omarov 2 years ago
parent
commit
eef1e1868a
  1. 26
      engine/common/base_cmd.c
  2. 1
      engine/common/base_cmd.h

26
engine/common/base_cmd.c

@ -141,32 +141,6 @@ void BaseCmd_Insert( base_command_type_e type, base_command_t *basecmd, const ch @@ -141,32 +141,6 @@ void BaseCmd_Insert( base_command_type_e type, base_command_t *basecmd, const ch
elem->next = find;
}
/*
============
BaseCmd_Replace
Used in case, when basecmd has been registered, but gamedll wants to register it's own
============
*/
qboolean BaseCmd_Replace( base_command_type_e type, base_command_t *basecmd, const char *name )
{
base_command_hashmap_t *i = BaseCmd_GetBucket( name );
for( ; i && ( i->type != type || Q_stricmp( name, i->name ) ) ; // filter out
i = i->next );
if( !i )
{
Con_Reportf( S_ERROR "BaseCmd_Replace: couldn't find %s\n", name);
return false;
}
i->basecmd = basecmd;
i->name = name; // may be freed after
return true;
}
/*
============
BaseCmd_Remove

1
engine/common/base_cmd.h

@ -38,7 +38,6 @@ base_command_t *BaseCmd_Find( base_command_type_e type, const char *name ); @@ -38,7 +38,6 @@ base_command_t *BaseCmd_Find( base_command_type_e type, const char *name );
void BaseCmd_FindAll( const char *name,
base_command_t **cmd, base_command_t **alias, base_command_t **cvar );
void BaseCmd_Insert ( base_command_type_e type, base_command_t *basecmd, const char *name );
qboolean BaseCmd_Replace( base_command_type_e type, base_command_t *basecmd, const char *name ); // only if same name
void BaseCmd_Remove ( base_command_type_e type, const char *name );
void BaseCmd_Stats_f( void ); // to be registered later
void BaseCmd_Test_f( void ); // to be registered later

Loading…
Cancel
Save