Simple constification (needed by the match compiler)

This commit is contained in:
Thomas Jarosch 2013-01-04 03:17:52 +01:00
parent f9c752667e
commit 7f0bc73e8e
1 changed files with 1 additions and 1 deletions

View File

@ -8745,7 +8745,7 @@ void Tokenizer::simplifyNamespaceStd()
}; };
static const std::set<std::string> stdFunctions(stdFunctions_, stdFunctions_+sizeof(stdFunctions_)/sizeof(*stdFunctions_)); static const std::set<std::string> 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; bool insert = false;
if (Token::Match(tok, "%var% (") && !Token::Match(tok->previous(), ".|::") && stdFunctions.find(tok->str()) != stdFunctions.end()) if (Token::Match(tok, "%var% (") && !Token::Match(tok->previous(), ".|::") && stdFunctions.find(tok->str()) != stdFunctions.end())
insert = true; insert = true;