From ee27dc1d24b6da3559c5c47aabc426be65b00f6c Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 11 Oct 2020 10:09:02 -0700 Subject: [PATCH] simplify some conditionals in add_segment() This has no effect on functionality, and is simply for readability. --- lib/ortho/trapezoid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ortho/trapezoid.c b/lib/ortho/trapezoid.c index 1b555ec53..5a3a2c878 100644 --- a/lib/ortho/trapezoid.c +++ b/lib/ortho/trapezoid.c @@ -444,8 +444,8 @@ add_segment (int segnum, segment_t* seg, trap_t* tr, qnode_t* qs) } else is_swapped = FALSE; - if ((is_swapped) ? !inserted(segnum, seg, LASTPT) : - !inserted(segnum, seg, FIRSTPT)) /* insert v0 in the tree */ + if (!inserted(segnum, seg, is_swapped ? LASTPT : FIRSTPT)) + /* insert v0 in the tree */ { int tmp_d; @@ -501,8 +501,8 @@ add_segment (int segnum, segment_t* seg, trap_t* tr, qnode_t* qs) } - if ((is_swapped) ? !inserted(segnum, seg, FIRSTPT) : - !inserted(segnum, seg, LASTPT)) /* insert v1 in the tree */ + if (!inserted(segnum, seg, is_swapped ? FIRSTPT : LASTPT)) + /* insert v1 in the tree */ { int tmp_d; -- 2.40.0