From 53967c83e9424d47b713828f5dbb9ea650206544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 31 Jan 2019 23:52:48 +0100 Subject: [PATCH] Fixed compile error --- lib/importproject.cpp | 2 +- lib/importproject.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/importproject.cpp b/lib/importproject.cpp index 2c684ca33..08ec3c672 100644 --- a/lib/importproject.cpp +++ b/lib/importproject.cpp @@ -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; diff --git a/lib/importproject.h b/lib/importproject.h index de07b9102..90952f6ba 100644 --- a/lib/importproject.h +++ b/lib/importproject.h @@ -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);