Added Cppcheck::clearFiles() function.

This commit is contained in:
Reijo Tomperi 2009-02-27 19:39:50 +00:00
parent 6b7b27a2e8
commit 42176f52ca
2 changed files with 11 additions and 0 deletions

View File

@ -66,6 +66,12 @@ void CppCheck::addFile(const std::string &path, const std::string &content)
_fileContents[ path ] = content;
}
void CppCheck::clearFiles()
{
_filenames.clear();
_fileContents.clear();
}
std::string CppCheck::parseFromArgs(int argc, const char* const argv[])
{
std::vector<std::string> pathnames;

View File

@ -89,6 +89,11 @@ public:
*/
void addFile(const std::string &path, const std::string &content);
/**
* Remove all files added with addFile() and parseFromArgs().
*/
void clearFiles();
/**
* Parse command line args and get settings and file lists
* from there.