Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
olabetskyi committed Jan 24, 2025
1 parent 5782bb9 commit 0686b64
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions lib/tokenize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7690,25 +7690,26 @@ void Tokenizer::simplifyInitVar()
continue;

if (Token::Match(tok, "%type% *|&| %name% (|{")) {
while(tok && !Token::Match(tok, "(|{"))
while (tok && !Token::Match(tok, "(|{"))
tok = tok->next();
tok->isInitBracket(true);
if (tok)
tok->isInitBracket(true);
/* tok = initVar(tok);
} else if (Token::Match(tok, "%type% *| %name% ( %type% (")) {
const Token* tok2 = tok->tokAt(2);
if (!tok2->link())
} else if (Token::Match(tok, "%type% *| %name% ( %type% (")) {
const Token* tok2 = tok->tokAt(2);
if (!tok2->link())
tok2 = tok2->next();
if (!tok2->link() || (tok2->link()->strAt(1) == ";" && !Token::simpleMatch(tok2->linkAt(2), ") (")))
if (!tok2->link() || (tok2->link()->strAt(1) == ";" && !Token::simpleMatch(tok2->linkAt(2), ") (")))
tok = initVar(tok);
} else if (Token::Match(tok, "class|struct|union| %type% *| %name% ( &| %any% ) ,") && tok->str() != "new") {
Token *tok1 = tok->tokAt(5);
while (tok1->str() != ",")
} else if (Token::Match(tok, "class|struct|union| %type% *| %name% ( &| %any% ) ,") && tok->str() != "new") {
Token *tok1 = tok->tokAt(5);
while (tok1->str() != ",")
tok1 = tok1->next();
tok1->str(";");
tok1->str(";");

const int numTokens = (Token::Match(tok, "class|struct|union")) ? 2 : 1;
TokenList::insertTokens(tok1, tok, numTokens);
tok = initVar(tok); */
const int numTokens = (Token::Match(tok, "class|struct|union")) ? 2 : 1;
TokenList::insertTokens(tok1, tok, numTokens);
tok = initVar(tok); */
}
}
}
Expand Down

0 comments on commit 0686b64

Please sign in to comment.