astyle style fixes
This commit is contained in:
parent
77cf2213fe
commit
1514e65464
|
@ -499,25 +499,25 @@ void Tokenizer::tokenize(std::istream &code, const char FileName[])
|
||||||
{
|
{
|
||||||
if (!Token::Match(tok2, pattern.c_str()))
|
if (!Token::Match(tok2, pattern.c_str()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// New type..
|
// New type..
|
||||||
const std::string type2(tok2->strAt(2));
|
const std::string type2(tok2->strAt(2));
|
||||||
|
|
||||||
// New funcname..
|
// New funcname..
|
||||||
const std::string funcname2(funcname + "<" + type2 + ">");
|
const std::string funcname2(funcname + "<" + type2 + ">");
|
||||||
|
|
||||||
// Create copy of template..
|
// Create copy of template..
|
||||||
const Token *tok3 = tok->tokAt(5);
|
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());
|
addtoken(funcname2.c_str(), tok3->linenr(), tok3->fileIndex());
|
||||||
int indentlevel = 0;
|
int indentlevel = 0;
|
||||||
for (tok3 = tok3->tokAt(2); tok3; tok3 = tok3->next())
|
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() == "{")
|
if (tok3->str() == "{")
|
||||||
++indentlevel;
|
++indentlevel;
|
||||||
|
|
||||||
else if (tok3->str() == "}")
|
else if (tok3->str() == "}")
|
||||||
{
|
{
|
||||||
if (indentlevel <= 1)
|
if (indentlevel <= 1)
|
||||||
|
@ -525,7 +525,7 @@ void Tokenizer::tokenize(std::istream &code, const char FileName[])
|
||||||
--indentlevel;
|
--indentlevel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace all these template usages..
|
// Replace all these template usages..
|
||||||
for (Token *tok4 = tok2; tok4; tok4 = tok4->next())
|
for (Token *tok4 = tok2; tok4; tok4 = tok4->next())
|
||||||
{
|
{
|
||||||
|
|
|
@ -76,7 +76,7 @@ private:
|
||||||
TEST_CASE(sizeof5);
|
TEST_CASE(sizeof5);
|
||||||
TEST_CASE(sizeof6);
|
TEST_CASE(sizeof6);
|
||||||
TEST_CASE(casting);
|
TEST_CASE(casting);
|
||||||
|
|
||||||
TEST_CASE(template1);
|
TEST_CASE(template1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -460,7 +460,7 @@ private:
|
||||||
"template < classname T > void f ( T val ) { T a ; } "
|
"template < classname T > void f ( T val ) { T a ; } "
|
||||||
"f<int> ( 10 ) ; "
|
"f<int> ( 10 ) ; "
|
||||||
"void f<int> ( int val ) { int a ; }");
|
"void f<int> ( int val ) { int a ; }");
|
||||||
|
|
||||||
ASSERT_EQUALS(expected, sizeof_(code));
|
ASSERT_EQUALS(expected, sizeof_(code));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue