lib: fix for my previous commit. If there are no dependencies then don't insert dependencies

This commit is contained in:
Daniel Marjamäki 2012-02-15 08:13:42 +01:00
parent 8f3d511871
commit 04e4b5d14d
1 changed files with 2 additions and 1 deletions

View File

@ -339,7 +339,8 @@ void CppCheck::checkFile(const std::string &code, const char FileName[])
}
// Update the _dependencies..
_dependencies.insert( _tokenizer.getFiles()->begin()+1, _tokenizer.getFiles()->end() );
if (_tokenizer.getFiles()->size() >= 2)
_dependencies.insert(_tokenizer.getFiles()->begin()+1, _tokenizer.getFiles()->end());
// call all "runChecks" in all registered Check classes
for (std::list<Check *>::iterator it = Check::instances().begin(); it != Check::instances().end(); ++it) {