mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 06:51:47 +00:00
COM_SkipPath now uses strrchr, it's much more readable now.
This commit is contained in:
parent
b2a53d4b46
commit
1094e146da
2 changed files with 12 additions and 12 deletions
|
@ -985,12 +985,12 @@ COM_SkipPath (char *pathname)
|
|||
{
|
||||
char *last;
|
||||
|
||||
last = pathname;
|
||||
while (*pathname) {
|
||||
if (*pathname == '/')
|
||||
last = pathname + 1;
|
||||
pathname++;
|
||||
}
|
||||
// char after last / on the line
|
||||
if ((last = strrchr (pathname, '/')))
|
||||
last++;
|
||||
else
|
||||
last = pathname;
|
||||
|
||||
return last;
|
||||
}
|
||||
|
||||
|
|
|
@ -1096,12 +1096,12 @@ COM_SkipPath (char *pathname)
|
|||
{
|
||||
char *last;
|
||||
|
||||
last = pathname;
|
||||
while (*pathname) {
|
||||
if (*pathname == '/')
|
||||
last = pathname + 1;
|
||||
pathname++;
|
||||
}
|
||||
// char after last / on the line
|
||||
if ((last = strrchr (pathname, '/')))
|
||||
last++;
|
||||
else
|
||||
last = pathname;
|
||||
|
||||
return last;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue