mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-12-03 17:42:55 +00:00
Merge pull request #1162 from devnexen/cmdparser_optim
cmdparser/server command little optimisations.
This commit is contained in:
commit
8b9f506a50
2 changed files with 6 additions and 6 deletions
|
@ -908,7 +908,7 @@ Cmd_CompleteMapCommand(char *partial)
|
|||
{
|
||||
char **mapNames;
|
||||
int i, j, k, nbMatches, len, nMaps;
|
||||
char *mapName;
|
||||
char *mapName, *lastsep;
|
||||
char *pmatch[1024];
|
||||
qboolean partialFillContinue = true;
|
||||
|
||||
|
@ -920,9 +920,9 @@ Cmd_CompleteMapCommand(char *partial)
|
|||
|
||||
for (i = 0; i < nMaps - 1; i++)
|
||||
{
|
||||
if (strrchr(mapNames[i], '/'))
|
||||
if ((lastsep = strrchr(mapNames[i], '/')))
|
||||
{
|
||||
mapName = strrchr(mapNames[i], '/') + 1;
|
||||
mapName = lastsep + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -317,7 +317,7 @@ void SV_ListMaps_f(void)
|
|||
char **userMapNames;
|
||||
int nUserMaps = 0;
|
||||
int i;
|
||||
char* mapName;
|
||||
char* mapName, *lastsep;
|
||||
|
||||
Com_Printf("\n");
|
||||
|
||||
|
@ -325,9 +325,9 @@ void SV_ListMaps_f(void)
|
|||
{
|
||||
for (i = 0; i < nUserMaps - 1; i++)
|
||||
{
|
||||
if (strrchr(userMapNames[i], '/'))
|
||||
if ((lastsep = strrchr(userMapNames[i], '/')))
|
||||
{
|
||||
mapName = strrchr(userMapNames[i], '/') + 1;
|
||||
mapName = lastsep + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue