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

No functional change.
This commit is contained in:
Slava Semushin 2009-08-30 02:25:15 +07:00
parent ea45d985c7
commit a1f40f3c17
2 changed files with 3 additions and 10 deletions

View File

@ -1794,10 +1794,8 @@ bool Tokenizer::removeReduntantConditions()
return ret;
}
bool Tokenizer::simplifyIfAddBraces()
void Tokenizer::simplifyIfAddBraces()
{
bool ret = false;
for (Token *tok = _tokens; tok; tok = tok ? tok->next() : NULL)
{
if (Token::Match(tok, "if|for|while ("))
@ -1834,7 +1832,7 @@ bool Tokenizer::simplifyIfAddBraces()
// If there is no code after he if(), abort
if (!tok->next())
return false;
return;
// insert open brace..
@ -1875,11 +1873,8 @@ bool Tokenizer::simplifyIfAddBraces()
{
tempToken->insertToken("}");
Token::createMutualLinks(tok, tempToken->next());
ret = true;
}
}
return ret;
}
bool Tokenizer::simplifyDoWhileAddBraces()

View File

@ -171,10 +171,8 @@ private:
void simplifyComma();
/** Add braces to an if-block
* @return true if something is modified
* false if nothing is done.
*/
bool simplifyIfAddBraces();
void simplifyIfAddBraces();
/** Add braces to an do-while block
* @return true if something is modified