Move include paths list to Settings class so we can set include paths from GUI.

This commit is contained in:
Kimmo Varis 2009-07-04 01:23:37 +03:00
parent 26358debcf
commit 3132041de3
3 changed files with 7 additions and 7 deletions

View File

@ -159,7 +159,7 @@ std::string CppCheck::parseFromArgs(int argc, const char* const argv[])
if (path[path.length()-1] != '/' && path[path.length()-1] != '\\')
path += '/';
_includePaths.push_back(path);
_settings._includePaths.push_back(path);
}
// Include paths
@ -344,13 +344,13 @@ unsigned int CppCheck::check()
{
// File content was given as a string
std::istringstream iss(_fileContents[ _filenames[c] ]);
preprocessor.preprocess(iss, filedata, configurations, fname, _includePaths);
preprocessor.preprocess(iss, filedata, configurations, fname, _settings._includePaths);
}
else
{
// Only file name was given, read the content from file
std::ifstream fin(fname.c_str());
preprocessor.preprocess(fin, filedata, configurations, fname, _includePaths);
preprocessor.preprocess(fin, filedata, configurations, fname, _settings._includePaths);
}
int checkCount = 0;

View File

@ -141,10 +141,6 @@ private:
/** Current configuration */
std::string cfg;
/** List of include paths, e.g. "my/includes/" which should be used
for finding include files inside source files. */
std::list<std::string> _includePaths;
std::list<std::string> _xmllist;
};

View File

@ -64,6 +64,10 @@ public:
Default value is 0. */
int _exitCode;
/** List of include paths, e.g. "my/includes/" which should be used
for finding include files inside source files. */
std::list<std::string> _includePaths;
/** Fill list of automaticly deallocated classes */
void autoDealloc(std::istream &istr);