Fixed compile error

This commit is contained in:
Daniel Marjamäki 2019-01-31 23:52:48 +01:00
parent e297e3a505
commit 53967c83e9
2 changed files with 2 additions and 2 deletions

View File

@ -189,7 +189,7 @@ ImportProject::Type ImportProject::import(const std::string &filename, Settings
} else if (endsWith(filename, ".bpr", 4)) {
importBcb6Prj(filename);
return ImportProject::Type::BORLAND;
} else if (endsWith(filename, ".cppcheck", 9)) {
} else if (settings && endsWith(filename, ".cppcheck", 9)) {
return importCppcheckGuiProject(fin, settings) ? ImportProject::Type::CPPCHECK_GUI : ImportProject::Type::MISSING;
}
return ImportProject::Type::UNKNOWN;

View File

@ -94,7 +94,7 @@ public:
void ignoreOtherConfigs(const std::string &cfg);
void ignoreOtherPlatforms(cppcheck::Platform::PlatformType platformType);
Type import(const std::string &filename, Settings *settings);
Type import(const std::string &filename, Settings *settings=nullptr);
protected:
void importCompileCommands(std::istream &istr);
bool importCppcheckGuiProject(std::istream &istr, Settings *settings);