From 7d259c073a74eb27fca8c42eebef8353588e9158 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Tue, 2 Dec 2014 16:19:52 +0300 Subject: [PATCH] Cache and reuse value --- lib/symboldatabase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 48f340b78..e70f1be95 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -3183,8 +3183,8 @@ const Function* SymbolDatabase::findFunction(const Token *tok) const // check for member function else if (Token::Match(tok->tokAt(-2), "!!this .")) { - if (Token::Match(tok->tokAt(-2), "%var% .")) { - const Token *tok1 = tok->tokAt(-2); + const Token *tok1 = tok->tokAt(-2); + if (Token::Match(tok1, "%var% .")) { if (tok1->varId()) { const Variable *var = getVariableFromVarId(tok1->varId());