astyle formatting

This commit is contained in:
Daniel Marjamäki 2011-02-20 12:22:01 +01:00
parent 46f4e46d30
commit 1cfb18be08
2 changed files with 13 additions and 13 deletions

View File

@ -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

View File

@ -1988,15 +1988,15 @@ private:
void template22()
{
const char code[] = "template <classname T> struct Fred { T a; };\n"
"Fred<std::string> fred;";
const char code[] = "template <classname T> struct Fred { T a; };\n"
"Fred<std::string> fred;";
const std::string expected("; "
"Fred<std::string> fred ; "
"struct Fred<std::string> { std :: string a ; }");
const std::string expected("; "
"Fred<std::string> fred ; "
"struct Fred<std::string> { std :: string a ; }");
ASSERT_EQUALS(expected, sizeof_(code));
}
ASSERT_EQUALS(expected, sizeof_(code));
}
void template_unhandled()