From 1cfb18be08cbab24fa13f66b538968c5e33dcd66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 20 Feb 2011 12:22:01 +0100 Subject: [PATCH] astyle formatting --- lib/tokenize.cpp | 12 ++++++------ test/testsimplifytokens.cpp | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 9b586e188..edd51acfa 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -2482,7 +2482,7 @@ static unsigned int templateParameters(const Token *tok) while (tok) { ++numberOfParameters; - + // skip std:: while (Token::Match(tok, "%var% ::")) tok = tok->tokAt(2); @@ -2975,8 +2975,8 @@ void Tokenizer::simplifyTemplatesInstantiate(const Token *tok, } // member function implemented outside class definition - else if (_indentlevel == 0 && - _parlevel == 0 && + else if (_indentlevel == 0 && + _parlevel == 0 && simplifyTemplatesInstantiateMatch(tok3, name, type.size(), ":: ~| %var% (")) { addtoken(name2.c_str(), tok3->linenr(), tok3->fileIndex()); @@ -3025,8 +3025,8 @@ void Tokenizer::simplifyTemplatesInstantiate(const Token *tok, // replace type with given type.. if (itype < type.size()) { - for (const Token *typetok = types2[itype]; - typetok && !Token::Match(typetok, "[,>]"); + for (const Token *typetok = types2[itype]; + typetok && !Token::Match(typetok, "[,>]"); typetok = typetok->next()) { addtoken(typetok, tok3->linenr(), tok3->fileIndex()); @@ -3111,7 +3111,7 @@ void Tokenizer::simplifyTemplatesInstantiate(const Token *tok, match = false; break; } - + typetok = typetok ? typetok->next() : 0; } else diff --git a/test/testsimplifytokens.cpp b/test/testsimplifytokens.cpp index 9a3a36dc2..23f219819 100644 --- a/test/testsimplifytokens.cpp +++ b/test/testsimplifytokens.cpp @@ -1988,15 +1988,15 @@ private: void template22() { - const char code[] = "template struct Fred { T a; };\n" - "Fred fred;"; + const char code[] = "template struct Fred { T a; };\n" + "Fred fred;"; - const std::string expected("; " - "Fred fred ; " - "struct Fred { std :: string a ; }"); + const std::string expected("; " + "Fred fred ; " + "struct Fred { std :: string a ; }"); - ASSERT_EQUALS(expected, sizeof_(code)); - } + ASSERT_EQUALS(expected, sizeof_(code)); + } void template_unhandled()