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

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

View File

@ -2356,12 +2356,10 @@ static void incdec(std::string &value, const std::string &op)
bool Tokenizer::simplifyVarDecl()
void Tokenizer::simplifyVarDecl()
{
// Split up variable declarations..
// "int a=4;" => "int a; a=4;"
bool ret = false;
for (Token *tok = _tokens; tok; tok = tok->next())
{
if (tok->previous() && !Token::Match(tok->previous(), "[{};)]"))
@ -2506,8 +2504,6 @@ bool Tokenizer::simplifyVarDecl()
if (tok2)
{
ret = true;
if (tok2->str() == ",")
{
tok2->str(";");
@ -2556,8 +2552,6 @@ bool Tokenizer::simplifyVarDecl()
}
}
}
return ret;
}

View File

@ -118,10 +118,8 @@ private:
/**
* Simplify variable declarations
* @return true if something is modified
* false if nothing is done.
*/
bool simplifyVarDecl();
void simplifyVarDecl();
/**
* insert an "int" after "unsigned" if needed: