Refactoring: Use the MathLib::toString to stringify a number

This commit is contained in:
Daniel Marjamäki 2009-08-21 14:50:13 +02:00
parent 439ff8b144
commit 7b3fdec5cf
1 changed files with 1 additions and 3 deletions

View File

@ -1346,9 +1346,7 @@ void CheckOther::nullPointerError(const Token *tok, const std::string &varname)
void CheckOther::nullPointerError(const Token *tok, const std::string &varname, const int line)
{
std::ostringstream ostr;
ostr << line;
reportError(tok, Severity::error, "nullPointer", "Possible null pointer dereference: " + varname + " - otherwise it is redundant to check if " + varname + " is null at line " + ostr.str());
reportError(tok, Severity::error, "nullPointer", "Possible null pointer dereference: " + varname + " - otherwise it is redundant to check if " + varname + " is null at line " + MathLib::toString<long>(line));
}
void CheckOther::zerodivError(const Token *tok)