Reuse already known values

This commit is contained in:
Dmitry-Me 2015-02-09 10:23:36 +03:00
parent 8a1b8df1ba
commit fd0155cacf
1 changed files with 2 additions and 2 deletions

View File

@ -387,9 +387,9 @@ static void valueFlowString(TokenList *tokenlist)
if (Token::Match(tok, "const char %var% [ %num%| ] = %str% ;")) {
const Token *vartok = tok->tokAt(2);
const Token *strtok = tok->linkAt(3)->tokAt(2);
const Token *strtok = vartok->next()->link()->tokAt(2);
constantStrings[vartok->varId()] = strtok;
tok = tok->tokAt(3);
tok = vartok->next();
}
if (tok->varId() > 0U) {