mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
Hoist strlen() outside loop in osdfunc_listsymbols()
git-svn-id: https://svn.eduke32.com/eduke32@7024 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4f590f59c1
commit
a677b18b2d
1 changed files with 3 additions and 1 deletions
|
@ -508,9 +508,11 @@ static int32_t osdfunc_listsymbols(osdfuncparm_t const * const parm)
|
||||||
else
|
else
|
||||||
OSD_Printf("%sSymbol listing:\n", osd->draw.highlight);
|
OSD_Printf("%sSymbol listing:\n", osd->draw.highlight);
|
||||||
|
|
||||||
|
int const parmlen = Bstrlen(parm->parms[0]);
|
||||||
|
|
||||||
for (i=symbols; i!=NULL; i=i->next)
|
for (i=symbols; i!=NULL; i=i->next)
|
||||||
{
|
{
|
||||||
if (i->func == OSD_UNALIASED || (parm->numparms == 1 && Bstrncmp(parm->parms[0], i->name, Bstrlen(parm->parms[0]))))
|
if (i->func == OSD_UNALIASED || (parm->numparms == 1 && Bstrncmp(parm->parms[0], i->name, parmlen)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue