Skip to content

Commit 0686b64

Browse files
committed
Format
1 parent 5782bb9 commit 0686b64

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

Diff for: lib/tokenize.cpp

+14-13
Original file line numberDiff line numberDiff line change
@@ -7690,25 +7690,26 @@ void Tokenizer::simplifyInitVar()
76907690
continue;
76917691

76927692
if (Token::Match(tok, "%type% *|&| %name% (|{")) {
7693-
while(tok && !Token::Match(tok, "(|{"))
7693+
while (tok && !Token::Match(tok, "(|{"))
76947694
tok = tok->next();
7695-
tok->isInitBracket(true);
7695+
if (tok)
7696+
tok->isInitBracket(true);
76967697
/* tok = initVar(tok);
7697-
} else if (Token::Match(tok, "%type% *| %name% ( %type% (")) {
7698-
const Token* tok2 = tok->tokAt(2);
7699-
if (!tok2->link())
7698+
} else if (Token::Match(tok, "%type% *| %name% ( %type% (")) {
7699+
const Token* tok2 = tok->tokAt(2);
7700+
if (!tok2->link())
77007701
tok2 = tok2->next();
7701-
if (!tok2->link() || (tok2->link()->strAt(1) == ";" && !Token::simpleMatch(tok2->linkAt(2), ") (")))
7702+
if (!tok2->link() || (tok2->link()->strAt(1) == ";" && !Token::simpleMatch(tok2->linkAt(2), ") (")))
77027703
tok = initVar(tok);
7703-
} else if (Token::Match(tok, "class|struct|union| %type% *| %name% ( &| %any% ) ,") && tok->str() != "new") {
7704-
Token *tok1 = tok->tokAt(5);
7705-
while (tok1->str() != ",")
7704+
} else if (Token::Match(tok, "class|struct|union| %type% *| %name% ( &| %any% ) ,") && tok->str() != "new") {
7705+
Token *tok1 = tok->tokAt(5);
7706+
while (tok1->str() != ",")
77067707
tok1 = tok1->next();
7707-
tok1->str(";");
7708+
tok1->str(";");
77087709

7709-
const int numTokens = (Token::Match(tok, "class|struct|union")) ? 2 : 1;
7710-
TokenList::insertTokens(tok1, tok, numTokens);
7711-
tok = initVar(tok); */
7710+
const int numTokens = (Token::Match(tok, "class|struct|union")) ? 2 : 1;
7711+
TokenList::insertTokens(tok1, tok, numTokens);
7712+
tok = initVar(tok); */
77127713
}
77137714
}
77147715
}

0 commit comments

Comments
 (0)