Added variable name to debug message about typeStartToken()

Fixed cppcheck message
This commit is contained in:
PKEuS 2014-09-29 14:36:03 +02:00
parent 0ae09c0029
commit 448195f255
2 changed files with 2 additions and 2 deletions

View File

@ -3842,7 +3842,7 @@ void Tokenizer::printDebugOutput() const
reportError(tok,
Severity::debug,
"debug",
"Variable::typeStartToken() is not located before Variable::typeEndToken(). The location of the typeStartToken() is '" + var->typeStartToken()->str() + "' at line " + MathLib::toString(var->typeStartToken()->linenr()));
"Variable::typeStartToken() of variable '" + var->name() + "' is not located before Variable::typeEndToken(). The location of the typeStartToken() is '" + var->typeStartToken()->str() + "' at line " + MathLib::toString(var->typeStartToken()->linenr()));
}
}
}

View File

@ -1062,7 +1062,7 @@ private:
// 1 scope: Global
ASSERT(db && db->scopeList.size() == 1);
if (db && db->scopeList.size() >= 1) {
if (db && !db->scopeList.empty()) {
// No functions
ASSERT(db->scopeList.front().functionList.empty());
}