refactoring: removed the changes to the error handling

This commit is contained in:
Daniel Marjamäki 2009-03-19 18:39:20 +01:00
parent 09ff4fa35f
commit 47d7ff983f
2 changed files with 2 additions and 12 deletions

View File

@ -35,7 +35,7 @@ void CheckStl::iterators()
// Same container..
if (tok->tokAt(2)->str() == tok->tokAt(10)->str())
continue;
errorIteratorUsage(tok, tok->strAt(2), tok->strAt(10));
_errorLogger->iteratorUsage(_tokenizer, tok, tok->strAt(2), tok->strAt(10));
}
// it = foo.begin();
@ -48,7 +48,7 @@ void CheckStl::iterators()
// Same container..
if (tok->tokAt(2)->str() == tok->tokAt(12)->str())
continue;
errorIteratorUsage(tok, tok->strAt(2), tok->strAt(12));
_errorLogger->iteratorUsage(_tokenizer, tok, tok->strAt(2), tok->strAt(12));
}
}
}
@ -250,12 +250,4 @@ void CheckStl::pushback()
}
void CheckStl::errorIteratorUsage(const Token * const tok, const char container1[], const char container2[])
{
ErrorLogger::ErrorMessage errmsg;
errmsg._severity = "error";
errmsg._msg = std::string("Same iterator is used with both ") + container1 + " and " + container2;
errmsg._id = "iteratorUsage";
_errorLogger->reportErr(errmsg);
}

View File

@ -76,8 +76,6 @@ private:
* @param it iterator token
*/
void eraseCheckLoop(const Token *it);
void errorIteratorUsage(const Token * const tok, const char container1[], const char container2[]);
};
//---------------------------------------------------------------------------