Skip to content

Commit c317c89

Browse files
committed
Run astyle
1 parent a645235 commit c317c89

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/tokenize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2501,7 +2501,7 @@ bool Tokenizer::tokenize(std::istream &code,
25012501
}
25022502

25032503
// Remove redundant consecutive braces, i.e. '.. { { .. } } ..' -> '.. { .. } ..'.
2504-
for (Token *tok = _tokens; tok; ) {
2504+
for (Token *tok = _tokens; tok;) {
25052505
if (Token::simpleMatch(tok, "{ {") && Token::simpleMatch(tok->next()->link(), "} }")) {
25062506
//remove internal parentheses
25072507
tok->next()->link()->deleteThis();
@@ -4339,7 +4339,7 @@ bool Tokenizer::simplifyTokenList()
43394339
simplifyFlowControl();
43404340

43414341
// Remove redundant consecutive braces, i.e. '.. { { .. } } ..' -> '.. { .. } ..'.
4342-
for (Token *tok = _tokens; tok; ) {
4342+
for (Token *tok = _tokens; tok;) {
43434343
if (Token::simpleMatch(tok, "{ {") && Token::simpleMatch(tok->next()->link(), "} }")) {
43444344
//remove internal parentheses
43454345
tok->next()->link()->deleteThis();

test/testsimplifytokens.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7500,9 +7500,9 @@ class TestSimplifyTokens : public TestFixture {
75007500
}
75017501

75027502
void consecutiveBraces() {
7503-
ASSERT_EQUALS("void f ( ) { }", tok("void f(){{}}", true));
7504-
ASSERT_EQUALS("void f ( ) { }", tok("void f(){{{}}}", true));
7505-
ASSERT_EQUALS("void f ( ) { for ( ; ; ) { } }", tok("void f(){for(;;){}}", true));
7503+
ASSERT_EQUALS("void f ( ) { }", tok("void f(){{}}", true));
7504+
ASSERT_EQUALS("void f ( ) { }", tok("void f(){{{}}}", true));
7505+
ASSERT_EQUALS("void f ( ) { for ( ; ; ) { } }", tok("void f(){for(;;){}}", true));
75067506
}
75077507
};
75087508

0 commit comments

Comments
 (0)