diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 790804b50..606854682 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -474,6 +474,7 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[]) _ignoredPaths.push_back(path); } } + // --library else if (std::strncmp(argv[i], "--library=", 10) == 0) { if (!CppCheckExecutor::tryLoadLibrary(_settings->library, argv[0], argv[i]+10)) diff --git a/cli/threadexecutor.h b/cli/threadexecutor.h index 960e11042..e844e17ad 100644 --- a/cli/threadexecutor.h +++ b/cli/threadexecutor.h @@ -23,7 +23,7 @@ #include #include #include "errorlogger.h" -#include "settings.h" // Project::FileSettings +#include "project.h" #if (defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__) #define THREADING_MODEL_FORK diff --git a/lib/platform.h b/lib/platform.h index 93d6022bf..fd4c8bff6 100644 --- a/lib/platform.h +++ b/lib/platform.h @@ -1,38 +1,36 @@ -/* -* Cppcheck - A tool for static C/C++ code analysis -* Copyright (C) 2007-2016 Cppcheck team. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ - -//--------------------------------------------------------------------------- -#ifndef platformH -#define platformH -//--------------------------------------------------------------------------- - -#include - -/// @addtogroup Core -/// @{ - -/** -* @brief This is just a container for general settings so that we don't need -* to pass individual values to functions or constructors now or in the -* future when we might have even more detailed settings. -*/ -struct CPPCHECKLIB Platform { -public: +/* +* Cppcheck - A tool for static C/C++ code analysis +* Copyright (C) 2007-2016 Cppcheck team. +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +//--------------------------------------------------------------------------- +#ifndef platformH +#define platformH +//--------------------------------------------------------------------------- + +#include + +/// @addtogroup Core +/// @{ + +/** +* @brief Platform settings +*/ +struct CPPCHECKLIB Platform { +public: Platform(); virtual ~Platform(){} @@ -101,9 +99,9 @@ public: default: return "unknown"; } - } -}; - -/// @} -//--------------------------------------------------------------------------- -#endif // platformH + } +}; + +/// @} +//--------------------------------------------------------------------------- +#endif // platformH diff --git a/lib/project.h b/lib/project.h index 71a7e0bbd..4274ffd77 100644 --- a/lib/project.h +++ b/lib/project.h @@ -32,15 +32,11 @@ /** - * @brief This is just a container for general settings so that we don't need - * to pass individual values to functions or constructors now or in the - * future when we might have even more detailed settings. + * @brief Project settings. */ class CPPCHECKLIB Project { public: - - - /** File */ + /** File settings. Multiple configurations for a file is allowed. */ struct FileSettings { FileSettings() : platformType(Platform::Unspecified) {} std::string filename; diff --git a/lib/settings.cpp b/lib/settings.cpp index 4f80f91d3..a0a7454eb 100644 --- a/lib/settings.cpp +++ b/lib/settings.cpp @@ -19,8 +19,6 @@ #include "settings.h" #include "preprocessor.h" // Preprocessor #include "utils.h" -#include "path.h" -#include "tokenlist.h" #include #include