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

No functional change.
This commit is contained in:
Slava Semushin 2009-08-30 02:26:56 +07:00
parent a1f40f3c17
commit 8efacf5dc3
2 changed files with 4 additions and 11 deletions

View File

@ -1877,10 +1877,8 @@ void Tokenizer::simplifyIfAddBraces()
}
}
bool Tokenizer::simplifyDoWhileAddBraces()
void Tokenizer::simplifyDoWhileAddBraces()
{
bool ret = false;
for (Token *tok = _tokens; tok; tok = (tok ? tok->next() : NULL))
{
if (! Token::Match(tok, "do !!{"))
@ -1913,12 +1911,8 @@ bool Tokenizer::simplifyDoWhileAddBraces()
tok2->previous()->insertToken("}");
Token::createMutualLinks(tok1->next(), tok2->previous());
ret = true;
}
}
return ret;
}
bool Tokenizer::simplifyConditionOperator()

View File

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