From eb6bf1bcaea5b4f4112061a7982b16264edb7e80 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Mon, 23 Oct 2017 00:42:56 +0300 Subject: [PATCH] Cache and reuse value --- lib/tokenize.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 5778d6d91..564a72725 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -1154,7 +1154,7 @@ void Tokenizer::simplifyTypedef() bool good = true; // check for extra qualification while (back >= 0) { - const Token *qualificationTok = start->tokAt(-2); + Token *qualificationTok = start->tokAt(-2); if (!Token::Match(qualificationTok, "%type% ::")) break; if (qualificationTok->str() == spaceInfo[back].className) {