Tokenizer::simplifyLogicalOperators(): change return type to void.

No functional change.
This commit is contained in:
Slava Semushin 2009-08-30 02:03:37 +07:00
parent 9d7defad22
commit 6f93182580
2 changed files with 2 additions and 6 deletions

View File

@ -2819,11 +2819,10 @@ bool Tokenizer::simplifyIfNotNull()
}
bool Tokenizer::simplifyLogicalOperators()
void Tokenizer::simplifyLogicalOperators()
{
// "if (not p)" => "if (!p)"
// "if (p and q)" => "if (p and q)"
bool ret = false;
for (Token *tok = _tokens; tok; tok = tok->next())
{
if (Token::Match(tok, "if|while ( not %var%"))
@ -2846,7 +2845,6 @@ bool Tokenizer::simplifyLogicalOperators()
tok->str("&&");
}
}
return ret;
}

View File

@ -167,10 +167,8 @@ private:
* Examples:
* "if (not p)" => "if (!p)"
* "if (p and q)" => "if (p && q)"
* @return true if something is modified
* false if nothing is done.
*/
bool simplifyLogicalOperators();
void simplifyLogicalOperators();
/**
* Simplify comma into a semicolon when possible