@@ -24,7 +24,7 @@ using odb::dbOrientType;
2424
2525static dbOrientType orientMirrorY (const dbOrientType& orient);
2626
27- NetBox::NetBox (dbNet* net, Rect box, bool ignore)
27+ NetBox::NetBox (dbNet* net, const Rect& box, bool ignore)
2828 : net_(net), box_(box), ignore_(ignore)
2929{
3030}
@@ -118,9 +118,9 @@ std::vector<dbInst*> OptimizeMirroring::findMirrorCandidates(
118118 unordered_set<dbInst*> existing;
119119 // Find inst terms on the boundary of the net boxes.
120120 for (NetBox* net_box : net_boxes) {
121- if (!net_box->ignore_ ) {
122- dbNet* net = net_box->net_ ;
123- Rect& box = net_box->box_ ;
121+ if (!net_box->isIgnore () ) {
122+ dbNet* net = net_box->getNet () ;
123+ const Rect& box = net_box->getBox () ;
124124 for (dbITerm* iterm : net->getITerms ()) {
125125 dbInst* inst = iterm->getInst ();
126126 int x, y;
@@ -204,7 +204,7 @@ int64_t OptimizeMirroring::hpwl(dbInst* inst)
204204 dbNet* net = iterm->getNet ();
205205 if (net) {
206206 NetBox& net_box = net_box_map_[net];
207- if (!net_box.ignore_ ) {
207+ if (!net_box.isIgnore () ) {
208208 inst_hpwl += net_box.hpwl ();
209209 }
210210 }
@@ -218,8 +218,8 @@ void OptimizeMirroring::updateNetBoxes(dbInst* inst)
218218 dbNet* net = iterm->getNet ();
219219 if (net) {
220220 NetBox& net_box = net_box_map_[net];
221- if (!net_box.ignore_ ) {
222- net_box_map_[net].box_ = net->getTermBBox ();
221+ if (!net_box.isIgnore () ) {
222+ net_box_map_[net].setBox ( net->getTermBBox () );
223223 }
224224 }
225225 }
0 commit comments