From 7b6b5b5db45ac9f485f30d7da9e9cef01b569251 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Tue, 31 Oct 2023 12:07:37 +0800 Subject: [PATCH] __ses_xchg_npn_ce() --- ses_layout.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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); -- 2.25.1