engine: common: remove unused BaseCmd_Replace

This commit is contained in:
Alibek Omarov 2023-04-03 04:31:58 +03:00
parent 4005ef831a
commit eef1e1868a
2 changed files with 0 additions and 27 deletions

View File

@ -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

View File

@ -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