astyle style fixes

This commit is contained in:
Daniel Marjamäki 2009-03-11 19:14:45 +01:00
parent 77cf2213fe
commit 1514e65464
2 changed files with 9 additions and 9 deletions

View File

@ -499,25 +499,25 @@ void Tokenizer::tokenize(std::istream &code, const char FileName[])
{
if (!Token::Match(tok2, pattern.c_str()))
continue;
// New type..
const std::string type2(tok2->strAt(2));
// New funcname..
const std::string funcname2(funcname + "<" + type2 + ">");
// Create copy of template..
const Token *tok3 = tok->tokAt(5);
addtoken(((tok3->str()==type)?type2:tok3->str()).c_str(), tok3->linenr(), tok3->fileIndex());
addtoken(((tok3->str() == type) ? type2 : tok3->str()).c_str(), tok3->linenr(), tok3->fileIndex());
addtoken(funcname2.c_str(), tok3->linenr(), tok3->fileIndex());
int indentlevel = 0;
for (tok3 = tok3->tokAt(2); tok3; tok3 = tok3->next())
{
addtoken(((tok3->str()==type)?type2:tok3->str()).c_str(), tok3->linenr(), tok3->fileIndex());
{
addtoken(((tok3->str() == type) ? type2 : tok3->str()).c_str(), tok3->linenr(), tok3->fileIndex());
if (tok3->str() == "{")
++indentlevel;
else if (tok3->str() == "}")
{
if (indentlevel <= 1)
@ -525,7 +525,7 @@ void Tokenizer::tokenize(std::istream &code, const char FileName[])
--indentlevel;
}
}
// Replace all these template usages..
for (Token *tok4 = tok2; tok4; tok4 = tok4->next())
{

View File

@ -76,7 +76,7 @@ private:
TEST_CASE(sizeof5);
TEST_CASE(sizeof6);
TEST_CASE(casting);
TEST_CASE(template1);
}
@ -460,7 +460,7 @@ private:
"template < classname T > void f ( T val ) { T a ; } "
"f<int> ( 10 ) ; "
"void f<int> ( int val ) { int a ; }");
ASSERT_EQUALS(expected, sizeof_(code));
}
};