Tokenizer::simplifyIfAssign(): change return type to void.
No functional change.
This commit is contained in:
parent
030a0c19df
commit
b435764083
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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..
|
||||
|
|
Loading…
Reference in New Issue