Cache and reuse value
This commit is contained in:
parent
539258f7a3
commit
46f726c049
|
@ -1153,9 +1153,12 @@ void Tokenizer::simplifyTypedef()
|
||||||
int back = int(classLevel) - 1;
|
int back = int(classLevel) - 1;
|
||||||
bool good = true;
|
bool good = true;
|
||||||
// check for extra qualification
|
// check for extra qualification
|
||||||
while (back >= 0 && Token::Match(start->tokAt(-2), "%type% ::")) {
|
while (back >= 0) {
|
||||||
if (start->strAt(-2) == spaceInfo[back].className) {
|
const Token *qualificationTok = start->tokAt(-2);
|
||||||
start = start->tokAt(-2);
|
if (!Token::Match(qualificationTok, "%type% ::")
|
||||||
|
break;
|
||||||
|
if (qualificationTok->str() == spaceInfo[back].className) {
|
||||||
|
start = qualificationTok;
|
||||||
back--;
|
back--;
|
||||||
count++;
|
count++;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue