Fix compilation with HAVE_RULES=yes

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2012-02-29 18:54:34 +01:00 committed by PKEuS
parent 1ef99e2f21
commit 2ce5b80599
1 changed files with 2 additions and 2 deletions

View File

@ -401,14 +401,14 @@ void CppCheck::checkFile(const std::string &code, const char FileName[])
// determine location..
ErrorLogger::ErrorMessage::FileLocation loc;
loc.setfile(_tokenizer.getFiles()->front());
loc.setfile(_tokenizer.getFiles().front());
loc.line = 0;
unsigned int len = 0;
for (const Token *tok = _tokenizer.tokens(); tok; tok = tok->next()) {
len = len + 1 + tok->str().size();
if (len > pos1) {
loc.setfile(_tokenizer.getFiles()->at(tok->fileIndex()));
loc.setfile(_tokenizer.getFiles().at(tok->fileIndex()));
loc.line = tok->linenr();
break;
}