From c317c8979c8d157dc43f311d8fbdacb4b74bcbb8 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Mon, 14 Nov 2011 09:21:42 +0100 Subject: [PATCH] Run astyle --- lib/tokenize.cpp | 4 ++-- test/testsimplifytokens.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index d68523b6a..c37919efa 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -2501,7 +2501,7 @@ bool Tokenizer::tokenize(std::istream &code, } // Remove redundant consecutive braces, i.e. '.. { { .. } } ..' -> '.. { .. } ..'. - for (Token *tok = _tokens; tok; ) { + for (Token *tok = _tokens; tok;) { if (Token::simpleMatch(tok, "{ {") && Token::simpleMatch(tok->next()->link(), "} }")) { //remove internal parentheses tok->next()->link()->deleteThis(); @@ -4339,7 +4339,7 @@ bool Tokenizer::simplifyTokenList() simplifyFlowControl(); // Remove redundant consecutive braces, i.e. '.. { { .. } } ..' -> '.. { .. } ..'. - for (Token *tok = _tokens; tok; ) { + for (Token *tok = _tokens; tok;) { if (Token::simpleMatch(tok, "{ {") && Token::simpleMatch(tok->next()->link(), "} }")) { //remove internal parentheses tok->next()->link()->deleteThis(); diff --git a/test/testsimplifytokens.cpp b/test/testsimplifytokens.cpp index 5242fb0c7..dfe407e3e 100644 --- a/test/testsimplifytokens.cpp +++ b/test/testsimplifytokens.cpp @@ -7500,9 +7500,9 @@ private: } void consecutiveBraces() { - ASSERT_EQUALS("void f ( ) { }", tok("void f(){{}}", true)); - ASSERT_EQUALS("void f ( ) { }", tok("void f(){{{}}}", true)); - ASSERT_EQUALS("void f ( ) { for ( ; ; ) { } }", tok("void f(){for(;;){}}", true)); + ASSERT_EQUALS("void f ( ) { }", tok("void f(){{}}", true)); + ASSERT_EQUALS("void f ( ) { }", tok("void f(){{{}}}", true)); + ASSERT_EQUALS("void f ( ) { for ( ; ; ) { } }", tok("void f(){for(;;){}}", true)); } };