Optimisation: Optimised firstWordEquals
This commit is contained in:
parent
5a8181d425
commit
1d79c164c4
|
@ -297,10 +297,12 @@ int Token::firstWordEquals(const char *str, const char *word)
|
||||||
{
|
{
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if (*str == ' ' && *word == 0)
|
if (*str != *word)
|
||||||
return 0;
|
{
|
||||||
else if (*str != *word)
|
if (*str == ' ' && *word == 0)
|
||||||
|
return 0;
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
else if (*str == 0)
|
else if (*str == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue