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)
42
42
{
43
43
std::cout << errmsg.toXML (true , 1 ) << std::endl;
44
44
}
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 {
53
53
}
54
54
55
55
/* * 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 ();
60
57
61
58
/* * run checks, the token list is not simplified */
62
59
virtual void runChecks (const Tokenizer *, const Settings *, ErrorLogger *) {
You can’t perform that action at this time.
0 commit comments