mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-14 13:10:09 +01:00
engine: common: remove unused BaseCmd_Replace
This commit is contained in:
parent
4005ef831a
commit
eef1e1868a
@ -141,32 +141,6 @@ void BaseCmd_Insert( base_command_type_e type, base_command_t *basecmd, const ch
|
|||||||
elem->next = find;
|
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
|
BaseCmd_Remove
|
||||||
|
@ -38,7 +38,6 @@ base_command_t *BaseCmd_Find( base_command_type_e type, const char *name );
|
|||||||
void BaseCmd_FindAll( const char *name,
|
void BaseCmd_FindAll( const char *name,
|
||||||
base_command_t **cmd, base_command_t **alias, base_command_t **cvar );
|
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 );
|
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_Remove ( base_command_type_e type, const char *name );
|
||||||
void BaseCmd_Stats_f( void ); // to be registered later
|
void BaseCmd_Stats_f( void ); // to be registered later
|
||||||
void BaseCmd_Test_f( void ); // to be registered later
|
void BaseCmd_Test_f( void ); // to be registered later
|
||||||
|
Loading…
Reference in New Issue
Block a user