Skip to content

Commit

Permalink
Use more descriptive name: c->child_index
Browse files Browse the repository at this point in the history
This code is definitely far too "clever".

Signed-off-by: William Pursell <william.r.pursell@gmail.com>
  • Loading branch information
wrp committed Oct 28, 2023
1 parent eefb451 commit d76ffd8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions action.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ prune(void)
S.c = NULL; /* Trigger an exit from main loop */
} else if (t && t->parent) {
struct canvas *p = t->parent;
int c = t == p->c[1];
*(c ? &p->split.x : &p->split.y) = 1.0;
p->c[c] = NULL;
int child_index = t == p->c[1];
*(child_index ? &p->split.x : &p->split.y) = 1.0;
p->c[child_index] = NULL;
change_count(t, -1, 1);
}
S.reshape = 1;
Expand Down

0 comments on commit d76ffd8

Please sign in to comment.