Skip to content

Commit

Permalink
[tidy] Clean up messy code for isNewClassNecessary()
Browse files Browse the repository at this point in the history
  • Loading branch information
thoni56 committed Sep 13, 2023
1 parent 1fdef06 commit acca77a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/extract.c
Original file line number Diff line number Diff line change
Expand Up @@ -1223,20 +1223,20 @@ static void javaGenerateNewClassTail(ProgramGraphNode *program) {
ppcGenRecord(PPC_STRING_VALUE, resultingString);
}

static bool isClassifiedAsAnyTypeOfOutArgument(ProgramGraphNode *p) {
return p->classification == CLASSIFIED_AS_OUT_ARGUMENT
|| p->classification == CLASSIFIED_AS_LOCAL_OUT_ARGUMENT
|| p->classification == CLASSIFIED_AS_IN_OUT_ARGUMENT;
}

/* ******************************************************************* */

static bool isNewClassNecessary(ProgramGraphNode *program) {
ProgramGraphNode *p;
for (p=program; p!=NULL; p=p->next) {
if (p->classification == CLASSIFIED_AS_OUT_ARGUMENT
|| p->classification == CLASSIFIED_AS_LOCAL_OUT_ARGUMENT
|| p->classification == CLASSIFIED_AS_IN_OUT_ARGUMENT
)
break;
for (ProgramGraphNode *p=program; p!=NULL; p=p->next) {
if (isClassifiedAsAnyTypeOfOutArgument(p))
return true;
}
if (p==NULL)
return false;
return true;
return false;
}

static bool programStructureMismatch() {
Expand Down

0 comments on commit acca77a

Please sign in to comment.