Permalink
Browse files

Fixed g++ -Wshadow warning message.

  • Loading branch information...
1 parent 61365ea commit c1718ae38d53b5cd56f51ccb0d0404788e99bab0 @edward-san edward-san committed Oct 16, 2012
Showing with 4 additions and 4 deletions.
  1. +3 −3 lib/checkstl.cpp
  2. +1 −1 lib/checkstl.h
View
@@ -39,12 +39,12 @@ void CheckStl::iteratorsError(const Token *tok, const std::string &container1, c
}
// Error message used when dereferencing an iterator that has been erased..
-void CheckStl::dereferenceErasedError(const Token *erase, const Token* deref, const std::string &itername)
+void CheckStl::dereferenceErasedError(const Token *erased, const Token* deref, const std::string &itername)
{
- if (erase) {
+ if (erased) {
std::list<const Token*> callstack;
callstack.push_back(deref);
- callstack.push_back(erase);
+ callstack.push_back(erased);
reportError(callstack, Severity::error, "eraseDereference",
"Iterator '" + itername + "' used after element has been erased.\n"
"The iterator '" + itername + "' is invalid after the element it pointed to has been erased. "
View
@@ -140,7 +140,7 @@ class CPPCHECKLIB CheckStl : public Check {
* @param tok token where error occurs
* @param itername iterator name
*/
- void dereferenceErasedError(const Token* erase, const Token* deref, const std::string &itername);
+ void dereferenceErasedError(const Token* erased, const Token* deref, const std::string &itername);
private:

0 comments on commit c1718ae

Please sign in to comment.