CheckAssert: Fixed shadow variable warning

This commit is contained in:
Daniel Marjamäki 2013-05-09 06:29:12 +02:00
parent 56e4487e26
commit 455b07a641
2 changed files with 4 additions and 4 deletions

View File

@ -116,7 +116,7 @@ void CheckAssert::assignmentInAssertError(const Token *tok, const std::string& v
}
// checks if side effects happen on the variable prior to tmp
bool CheckAssert::checkVariableAssignment(const Token* assignTok, bool reportError /*= true*/)
bool CheckAssert::checkVariableAssignment(const Token* assignTok, bool reportErr /*= true*/)
{
const Variable* v = assignTok->previous()->variable();
if (!v) return false;
@ -126,7 +126,7 @@ bool CheckAssert::checkVariableAssignment(const Token* assignTok, bool reportErr
if (v->isConst()) return false;
if (reportError) // report as variable assignment error
if (reportErr) // report as variable assignment error
assignmentInAssertError(assignTok, v->name());
return true;

View File

@ -49,7 +49,7 @@ public:
void assertWithSideEffects();
protected:
bool checkVariableAssignment(const Token* tmp, bool reportError = true);
bool checkVariableAssignment(const Token* tmp, bool reportErr = true);
bool inSameScope(const Token* returnTok, const Token* assignTok);
static const Token* findAssertPattern(const Token *start);