diff --git a/lib/checkstl.cpp b/lib/checkstl.cpp index 5c3016292..e15613d5d 100644 --- a/lib/checkstl.cpp +++ b/lib/checkstl.cpp @@ -1255,7 +1255,7 @@ void CheckStl::checkAutoPointer() } if (Token::Match(tok3, "( %var%")) { std::map::const_iterator it = mallocVarId.find(tok3->next()->varId()); - if (it != mallocVarId.cend()) { + if (it != mallocVarId.end()) { // pointer on the memory allocated by malloc used in the auto pointer constructor -> error autoPointerMallocError(tok2->next(), it->second); }