From 455b07a64101c1308111e44f070523e57bcce728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 9 May 2013 06:29:12 +0200 Subject: [PATCH] CheckAssert: Fixed shadow variable warning --- lib/checkassert.cpp | 4 ++-- lib/checkassert.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/checkassert.cpp b/lib/checkassert.cpp index 2324567c3..26069a071 100644 --- a/lib/checkassert.cpp +++ b/lib/checkassert.cpp @@ -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; diff --git a/lib/checkassert.h b/lib/checkassert.h index 030770d9f..691eaa59e 100644 --- a/lib/checkassert.h +++ b/lib/checkassert.h @@ -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); @@ -73,4 +73,4 @@ private: }; /// @} //--------------------------------------------------------------------------- -#endif \ No newline at end of file +#endif