From eeda0442faaa3464e6a4dcb7f1d1fbbc0e5f0b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 1 Jun 2020 08:59:34 +0200 Subject: [PATCH] astyle formatting [ci skip] --- lib/checkother.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 82a078ce2..ef983bdfc 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -1367,16 +1367,16 @@ void CheckOther::checkConstVariable() if (Function::returnsReference(function)) { std::vector returns = Function::findReturns(function); if (std::any_of(returns.begin(), returns.end(), [&](const Token* retTok) { - if (retTok->varId() == var->declarationId()) - return true; - while (Token::simpleMatch(retTok, ".")) - retTok = retTok->astOperand2(); - const Variable* retVar = getLifetimeVariable(getParentLifetime(retTok)); - if (!retVar) - return false; - return retVar->declarationId() == var->declarationId(); - })) - continue; + if (retTok->varId() == var->declarationId()) + return true; + while (Token::simpleMatch(retTok, ".")) + retTok = retTok->astOperand2(); + const Variable* retVar = getLifetimeVariable(getParentLifetime(retTok)); + if (!retVar) + return false; + return retVar->declarationId() == var->declarationId(); + })) + continue; } // Skip if address is taken if (Token::findmatch(var->nameToken(), "& %varid%", scope->bodyEnd, var->declarationId()))