astyle formatting

This commit is contained in:
Daniel Marjamäki 2011-02-03 22:20:59 +01:00
parent 53956496b2
commit 398190460f
2 changed files with 15 additions and 11 deletions

View File

@ -93,7 +93,7 @@ public:
virtual void getErrorMessages(ErrorLogger *errorLogger, const Settings *settings) = 0;
/** class name, used to generate documentation */
std::string name() const
std::string name() const
{
return _name;
}
@ -159,14 +159,16 @@ private:
};
namespace std {
/** compare the names of Check classes, used when sorting the Check descendants */
template <> struct less<Check *> {
bool operator()(const Check *p1, const Check *p2) const
{
return (p1->name() < p2->name());
}
};
namespace std
{
/** compare the names of Check classes, used when sorting the Check descendants */
template <> struct less<Check *>
{
bool operator()(const Check *p1, const Check *p2) const
{
return (p1->name() < p2->name());
}
};
}
inline Check::Check(const std::string &aname)

View File

@ -72,10 +72,12 @@ private:
void instancesSorted()
{
for (std::list<Check *>::iterator i = Check::instances().begin(); i != Check::instances().end(); ++i) {
for (std::list<Check *>::iterator i = Check::instances().begin(); i != Check::instances().end(); ++i)
{
std::list<Check *>::iterator j = i;
++j;
if (j != Check::instances().end()) {
if (j != Check::instances().end())
{
ASSERT_EQUALS(true, (*i)->name() < (*j)->name());
}
}