From 0cef076f10ff3481284cdd2113910a56a657a734 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Fri, 28 Aug 2015 15:19:24 +0300 Subject: [PATCH] Prefer previous() to tokAt(-1) --- lib/checkclass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index a57636d43..396ffe05c 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -1850,7 +1850,7 @@ bool CheckClass::checkConstFunc(const Scope *scope, const Function *func, bool& return (false); - const Token* lhs = tok1->tokAt(-1); + const Token* lhs = tok1->previous(); if (lhs->str() == "&") { lhs = lhs->previous(); if (lhs->tokType() == Token::eAssignmentOp && lhs->previous()->variable()) {