Skip to content

Commit 7d259c0

Browse files
committed
Cache and reuse value
1 parent 33be0f4 commit 7d259c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/symboldatabase.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3183,8 +3183,8 @@ const Function* SymbolDatabase::findFunction(const Token *tok) const
31833183

31843184
// check for member function
31853185
else if (Token::Match(tok->tokAt(-2), "!!this .")) {
3186-
if (Token::Match(tok->tokAt(-2), "%var% .")) {
3187-
const Token *tok1 = tok->tokAt(-2);
3186+
const Token *tok1 = tok->tokAt(-2);
3187+
if (Token::Match(tok1, "%var% .")) {
31883188

31893189
if (tok1->varId()) {
31903190
const Variable *var = getVariableFromVarId(tok1->varId());

0 commit comments

Comments
 (0)