astyle: updated the code style

This commit is contained in:
Daniel Marjamäki 2009-01-10 14:29:59 +00:00
parent 8c4260519c
commit a2a8378749
3 changed files with 8 additions and 8 deletions

View File

@ -71,7 +71,7 @@ struct CheckClass::VAR *CheckClass::ClassChecking_GetVarList(const Token *tok1)
if (indentlevel != 1)
continue;
// "private:" "public:" "protected:" etc
// "private:" "public:" "protected:" etc
bool b = bool((*tok->strAt(0) != ':') && strchr(tok->strAt(0), ':') != 0);
// Search for start of statement..

View File

@ -39,7 +39,7 @@ private:
TEST_CASE(sprintf1); // Dangerous usage of sprintf
TEST_CASE(sprintf2);
TEST_CASE(sprintf3);
TEST_CASE(sprintf3);
}
void check(const char code[])
@ -127,16 +127,16 @@ private:
ASSERT_EQUALS(std::string(""), errout.str());
}
void sprintf3()
{
void sprintf3()
{
sprintfUsage("void foo()\n"
"{\n"
" char buf[100];\n"
" sprintf(buf,\"%i\",sizeof(buf));\n"
" if (buf[0]);\n"
" if (buf[0]);\n"
"}\n");
ASSERT_EQUALS(std::string(""), errout.str());
}
}
};

View File

@ -50,8 +50,8 @@ int main()
// Error messages..
std::list<Message> err;
// checkclass.cpp..
err.push_back(Message("noConstructor", Message::STYLE, "The class '%1' has no constructor", "classname"));
// checkclass.cpp..
err.push_back(Message("noConstructor", Message::STYLE, "The class '%1' has no constructor", "classname"));
// checkmemoryleak.cpp..
err.push_back(Message("memleak", 0, "Memory leak: %1", "varname"));