astyle formatting

This commit is contained in:
Daniel Marjamäki 2014-11-26 16:13:57 +01:00
parent 465555e39d
commit 139414bd5c
2 changed files with 10 additions and 9 deletions

View File

@ -43,14 +43,15 @@ void Check::reportError(const ErrorLogger::ErrorMessage &errmsg)
std::cout << errmsg.toXML(true, 1) << std::endl;
}
std::list<Check *> &Check::instances() {
std::list<Check *> &Check::instances()
{
#ifdef __SVR4
// Under Solaris, destructors are called in wrong order which causes a segmentation fault.
// This fix ensures pointer remains valid and reachable until program terminates.
static std::list<Check *> *_instances= new std::list<Check *>;
return *_instances;
// Under Solaris, destructors are called in wrong order which causes a segmentation fault.
// This fix ensures pointer remains valid and reachable until program terminates.
static std::list<Check *> *_instances= new std::list<Check *>;
return *_instances;
#else
static std::list<Check *> _instances;
return _instances;
static std::list<Check *> _instances;
return _instances;
#endif
}
}

View File

@ -53,7 +53,7 @@ public:
}
/** List of registered check classes. This is used by Cppcheck to run checks and generate documentation */
static std::list<Check *> &instances();
static std::list<Check *> &instances();
/** run checks, the token list is not simplified */
virtual void runChecks(const Tokenizer *, const Settings *, ErrorLogger *) {