File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -42,3 +42,7 @@ void Check::reportError(const ErrorLogger::ErrorMessage &errmsg)
4242{
4343 std::cout << errmsg.toXML (true , 1 ) << std::endl;
4444}
45+ std::list<Check *> &Check::instances () {
46+ static std::list<Check *> *_instances= new std::list<Check *>;
47+ return *_instances;
48+ }
Original file line number Diff line number Diff line change @@ -53,10 +53,7 @@ class CPPCHECKLIB Check {
5353 }
5454
5555 /* * List of registered check classes. This is used by Cppcheck to run checks and generate documentation */
56- static std::list<Check *> &instances () {
57- static std::list<Check *> _instances;
58- return _instances;
59- }
56+ static std::list<Check *> &instances ();
6057
6158 /* * run checks, the token list is not simplified */
6259 virtual void runChecks (const Tokenizer *, const Settings *, ErrorLogger *) {
You can’t perform that action at this time.
0 commit comments