astyle formatting
This commit is contained in:
parent
01df6e23ef
commit
484b68c550
|
@ -1594,7 +1594,8 @@ bool CheckUnusedVar::isEmptyType(const Type* type)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckUnusedVar::isFunctionWithoutSideEffects(const Function& func, const Token* functionUsageToken,
|
bool CheckUnusedVar::isFunctionWithoutSideEffects(const Function& func, const Token* functionUsageToken,
|
||||||
std::list<const Function*> checkedFuncs) {
|
std::list<const Function*> checkedFuncs)
|
||||||
|
{
|
||||||
// no body to analyze
|
// no body to analyze
|
||||||
if (!func.hasBody()) {
|
if (!func.hasBody()) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -1609,8 +1610,7 @@ bool CheckUnusedVar::isFunctionWithoutSideEffects(const Function& func, const To
|
||||||
|
|
||||||
bool sideEffectReturnFound = false;
|
bool sideEffectReturnFound = false;
|
||||||
for (Token* bodyToken = func.functionScope->bodyStart->next(); bodyToken != func.functionScope->bodyEnd;
|
for (Token* bodyToken = func.functionScope->bodyStart->next(); bodyToken != func.functionScope->bodyEnd;
|
||||||
bodyToken = bodyToken->next())
|
bodyToken = bodyToken->next()) {
|
||||||
{
|
|
||||||
const Variable* bodyVariable = bodyToken->variable();
|
const Variable* bodyVariable = bodyToken->variable();
|
||||||
if (bodyVariable) {
|
if (bodyVariable) {
|
||||||
// check variable for side-effects
|
// check variable for side-effects
|
||||||
|
|
|
@ -515,8 +515,7 @@ private:
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void cleanFunction()
|
void cleanFunction() {
|
||||||
{
|
|
||||||
// unknown function
|
// unknown function
|
||||||
functionVariableUsage(
|
functionVariableUsage(
|
||||||
"class F {\n"
|
"class F {\n"
|
||||||
|
|
Loading…
Reference in New Issue