From 448195f2552183c2d6d979726e9c9e4afd544fec Mon Sep 17 00:00:00 2001 From: PKEuS Date: Mon, 29 Sep 2014 14:36:03 +0200 Subject: [PATCH] Added variable name to debug message about typeStartToken() Fixed cppcheck message --- lib/tokenize.cpp | 2 +- test/testsymboldatabase.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index ebded488c..74084374a 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -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())); } } } diff --git a/test/testsymboldatabase.cpp b/test/testsymboldatabase.cpp index 5a88c4dc7..822b305cb 100644 --- a/test/testsymboldatabase.cpp +++ b/test/testsymboldatabase.cpp @@ -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()); }