From: yu.dongliang <18588496441@163.com> Date: Tue, 31 Oct 2023 04:07:37 +0000 (+0800) Subject: __ses_xchg_npn_ce() X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=7b6b5b5db45ac9f485f30d7da9e9cef01b569251;p=ses.git __ses_xchg_npn_ce() --- diff --git a/ses_layout.c b/ses_layout.c index b0f4c9a..6e7a9fc 100644 --- a/ses_layout.c +++ b/ses_layout.c @@ -1027,17 +1027,20 @@ static void __ses_xchg_npn_ce(ScfEfunction* f, int d) pc->x = (pc->x + c->x * 3) / 4; - if (pc->y > pe->y && pe->y > pb->y) { + if (pc->y > pe->y) + SCF_XCHG(pc, pe); - if ((c->x < 0 && pc->x > pe->x) || (c->x > 0 && pc->x < pe->x)) + if (pc->y > pb->y) { + + if ((c->x < 0 && pc->x < pe->x) || (c->x > 0 && pc->x > pe->x)) SCF_XCHG(pc->x, pe->x); - } else if (pc->y < pe->y && pe->y < pb->y) { + } else if (pe->y < pb->y) { if ((c->x < 0 && pc->x > pe->x) || (c->x > 0 && pc->x < pe->x)) SCF_XCHG(pc->x, pe->x); - } else if ((pc->y > pb->y && pb->y > pe->y) || (pc->y < pb->y && pb->y < pe->y)) { + } else if (pc->y < pb->y) { if ((c->x > 0 && pc->x < pb->x) || (c->x < 0 && pc->x > pb->x)) { SCF_XCHG(pc->x, pe->x);