Optimisation: Optimised firstWordEquals

This commit is contained in:
Daniel Marjamäki 2010-08-08 18:54:49 +02:00
parent 5a8181d425
commit 1d79c164c4
1 changed files with 5 additions and 3 deletions

View File

@ -297,10 +297,12 @@ int Token::firstWordEquals(const char *str, const char *word)
{
for (;;)
{
if (*str == ' ' && *word == 0)
return 0;
else if (*str != *word)
if (*str != *word)
{
if (*str == ' ' && *word == 0)
return 0;
return 1;
}
else if (*str == 0)
break;