Prefer previous() to tokAt(-1)
This commit is contained in:
parent
966be8f555
commit
0cef076f10
|
@ -1850,7 +1850,7 @@ bool CheckClass::checkConstFunc(const Scope *scope, const Function *func, bool&
|
||||||
return (false);
|
return (false);
|
||||||
|
|
||||||
|
|
||||||
const Token* lhs = tok1->tokAt(-1);
|
const Token* lhs = tok1->previous();
|
||||||
if (lhs->str() == "&") {
|
if (lhs->str() == "&") {
|
||||||
lhs = lhs->previous();
|
lhs = lhs->previous();
|
||||||
if (lhs->tokType() == Token::eAssignmentOp && lhs->previous()->variable()) {
|
if (lhs->tokType() == Token::eAssignmentOp && lhs->previous()->variable()) {
|
||||||
|
|
Loading…
Reference in New Issue