Skip to content

Commit ecc2be4

Browse files
committed
ppl: avoid nested ternary operators
Signed-off-by: Eder Monteiro <[email protected]>
1 parent f194f73 commit ecc2be4

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/ppl/src/IOPlacer.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -845,12 +845,18 @@ std::vector<Point> IOPlacer::findLayerSlots(const int layer,
845845
- num_tracks_offset;
846846
if (vertical_pin) {
847847
curr_x = init_tracks + start_idx * min_dst_pins;
848-
curr_y = is_die_polygon ? edge_start.getY()
849-
: ((edge == Edge::bottom) ? lb_y : ub_y);
848+
if (is_die_polygon) {
849+
curr_y = edge_start.getY();
850+
} else {
851+
curr_y = (edge == Edge::bottom) ? lb_y : ub_y;
852+
}
850853
} else {
851854
curr_y = init_tracks + start_idx * min_dst_pins;
852-
curr_x = is_die_polygon ? edge_start.getX()
853-
: ((edge == Edge::left) ? lb_x : ub_x);
855+
if (is_die_polygon) {
856+
curr_x = edge_start.getX();
857+
} else {
858+
curr_x = (edge == Edge::left) ? lb_x : ub_x;
859+
}
854860
}
855861

856862
for (int i = start_idx; i <= end_idx; ++i) {

0 commit comments

Comments
 (0)