From fefb0ca9128de6c3d82838afa51bc6fec0d8b85b Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Fri, 14 Nov 2014 13:24:56 +0300 Subject: [PATCH] Reuse previously computed values --- lib/checkother.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index d26b65d51..7b5362f48 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -112,8 +112,8 @@ bool isSameExpression(const Token *tok1, const Token *tok2, const std::setnext(); const Token *t2 = tok2->next(); - const Token *end1 = tok1->next()->link(); - const Token *end2 = tok2->next()->link(); + const Token *end1 = t1->link(); + const Token *end2 = t2->link(); while (t1 && t2 && t1 != end1 && t2 != end2) { if (t1->str() != t2->str()) return false;