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

No functional change.
This commit is contained in:
Slava Semushin 2009-08-30 02:17:17 +07:00
parent 030a0c19df
commit b435764083
2 changed files with 2 additions and 11 deletions

View File

@ -2579,10 +2579,8 @@ void Tokenizer::unsignedint()
}
bool Tokenizer::simplifyIfAssign()
void Tokenizer::simplifyIfAssign()
{
bool ret = false;
for (Token *tok = _tokens; tok; tok = tok->next())
{
if (!Token::Match(tok->next(), "if|while ( !| (| %var% =") &&
@ -2595,9 +2593,6 @@ bool Tokenizer::simplifyIfAssign()
// delete the "if"
tok->deleteNext();
// The tokenlist has changed
ret = true;
// Remember if there is a "!" or not. And delete it if there are.
const bool isNot(tok->tokAt(2)->str() == "!");
if (isNot)
@ -2690,8 +2685,6 @@ bool Tokenizer::simplifyIfAssign()
}
}
}
return ret;
}

View File

@ -138,10 +138,8 @@ private:
/**
* simplify if-assignments..
* Example: "if(a=b);" => "a=b;if(a);"
* @return true if something is modified
* false if nothing is done.
*/
bool simplifyIfAssign();
void simplifyIfAssign();
/**
* simplify if-not..