Astyle fixes.
This commit is contained in:
parent
635acfa2ab
commit
6393498966
@ -47,7 +47,7 @@ bool CheckAutoVariables::errorAv(const Token* left, const Token* right)
|
|||||||
std::string right_var = right->str();
|
std::string right_var = right->str();
|
||||||
std::list<std::string>::iterator it_fp;
|
std::list<std::string>::iterator it_fp;
|
||||||
|
|
||||||
for (it_fp = fp_list.begin();it_fp != fp_list.end();++it_fp)
|
for (it_fp = fp_list.begin(); it_fp != fp_list.end(); ++it_fp)
|
||||||
{
|
{
|
||||||
std::string vname = (*it_fp);
|
std::string vname = (*it_fp);
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ bool CheckAutoVariables::errorAv(const Token* left, const Token* right)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
std::list<std::string>::iterator id_vd;
|
std::list<std::string>::iterator id_vd;
|
||||||
for (id_vd = vd_list.begin();id_vd != vd_list.end();++id_vd)
|
for (id_vd = vd_list.begin(); id_vd != vd_list.end(); ++id_vd)
|
||||||
{
|
{
|
||||||
std::string vname = (*id_vd);
|
std::string vname = (*id_vd);
|
||||||
//The left argument is a variable declaration
|
//The left argument is a variable declaration
|
||||||
@ -82,7 +82,7 @@ bool CheckAutoVariables::isAutoVar(const Token* t)
|
|||||||
{
|
{
|
||||||
std::list<std::string>::iterator id_vd;
|
std::list<std::string>::iterator id_vd;
|
||||||
std::string v = t->str();
|
std::string v = t->str();
|
||||||
for (id_vd = vd_list.begin();id_vd != vd_list.end();++id_vd)
|
for (id_vd = vd_list.begin(); id_vd != vd_list.end(); ++id_vd)
|
||||||
{
|
{
|
||||||
std::string vname = (*id_vd);
|
std::string vname = (*id_vd);
|
||||||
if (vname == v)
|
if (vname == v)
|
||||||
@ -94,7 +94,7 @@ void print(const Token *tok, int num)
|
|||||||
{
|
{
|
||||||
const Token *t = tok;
|
const Token *t = tok;
|
||||||
std::cout << tok->linenr() << " PRINT ";
|
std::cout << tok->linenr() << " PRINT ";
|
||||||
for (int i = 0;i < num;i++)
|
for (int i = 0; i < num; i++)
|
||||||
{
|
{
|
||||||
std::cout << " [" << t->str() << "] ";
|
std::cout << " [" << t->str() << "] ";
|
||||||
t = t->next();
|
t = t->next();
|
||||||
|
@ -276,7 +276,7 @@ void CheckStl::pushback()
|
|||||||
std::string vectorname;
|
std::string vectorname;
|
||||||
int indent = 0;
|
int indent = 0;
|
||||||
bool invalidIterator = false;
|
bool invalidIterator = false;
|
||||||
for (const Token *tok2 = tok;indent >= 0 && tok2; tok2 = tok2->next())
|
for (const Token *tok2 = tok; indent >= 0 && tok2; tok2 = tok2->next())
|
||||||
{
|
{
|
||||||
if (tok2->str() == "{" || tok2->str() == "(")
|
if (tok2->str() == "{" || tok2->str() == "(")
|
||||||
++indent;
|
++indent;
|
||||||
|
@ -344,14 +344,14 @@ public:
|
|||||||
{
|
{
|
||||||
switch (severity)
|
switch (severity)
|
||||||
{
|
{
|
||||||
case error:
|
case error:
|
||||||
return "error";
|
return "error";
|
||||||
case style:
|
case style:
|
||||||
return "style";
|
return "style";
|
||||||
case possibleError:
|
case possibleError:
|
||||||
return "possible error";
|
return "possible error";
|
||||||
case possibleStyle:
|
case possibleStyle:
|
||||||
return "possible style";
|
return "possible style";
|
||||||
};
|
};
|
||||||
return "???";
|
return "???";
|
||||||
}
|
}
|
||||||
|
@ -2915,7 +2915,7 @@ const Token * Tokenizer::findClassFunction(const Token *tok, const char classnam
|
|||||||
std::ostringstream externalPattern;
|
std::ostringstream externalPattern;
|
||||||
externalPattern << classname << " :: " << funcname << " (";
|
externalPattern << classname << " :: " << funcname << " (";
|
||||||
|
|
||||||
for (;tok; tok = tok->next())
|
for (; tok; tok = tok->next())
|
||||||
{
|
{
|
||||||
if (indentlevel == 0 && Token::Match(tok, classPattern.str().c_str()))
|
if (indentlevel == 0 && Token::Match(tok, classPattern.str().c_str()))
|
||||||
{
|
{
|
||||||
|
@ -191,7 +191,7 @@ private:
|
|||||||
{
|
{
|
||||||
if (tok->linenr() != tok->next()->linenr())
|
if (tok->linenr() != tok->next()->linenr())
|
||||||
{
|
{
|
||||||
for (unsigned int i = tok->linenr();i < tok->next()->linenr();++i)
|
for (unsigned int i = tok->linenr(); i < tok->next()->linenr(); ++i)
|
||||||
ostr << "\n";
|
ostr << "\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user