diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 439af6022..90a22b877 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -8745,7 +8745,7 @@ void Tokenizer::simplifyNamespaceStd() }; static const std::set stdFunctions(stdFunctions_, stdFunctions_+sizeof(stdFunctions_)/sizeof(*stdFunctions_)); - for (Token* tok = Token::findsimplematch(list.front(), "using namespace std ;"); tok; tok = tok->next()) { + for (const Token* tok = Token::findsimplematch(list.front(), "using namespace std ;"); tok; tok = tok->next()) { bool insert = false; if (Token::Match(tok, "%var% (") && !Token::Match(tok->previous(), ".|::") && stdFunctions.find(tok->str()) != stdFunctions.end()) insert = true;