@@ -105,7 +105,7 @@ void frRegionQuery::Impl::add(frShape* shape,
105105{
106106 if (shape->typeId () == frcPathSeg || shape->typeId () == frcRect) {
107107 odb::Rect frb = shape->getBBox ();
108- allShapes.at (shape->getLayerNum ()).push_back ( std::make_pair ( frb, shape) );
108+ allShapes.at (shape->getLayerNum ()).emplace_back ( frb, shape);
109109 } else {
110110 logger->error (DRT, 5 , " Unsupported region query add." );
111111 }
@@ -134,7 +134,7 @@ void frRegionQuery::Impl::addDRObj(frShape* shape,
134134 if (shape->typeId () == frcPathSeg || shape->typeId () == frcRect
135135 || shape->typeId () == frcPatchWire) {
136136 odb::Rect frb = shape->getBBox ();
137- allShapes.at (shape->getLayerNum ()).push_back ( std::make_pair ( frb, shape) );
137+ allShapes.at (shape->getLayerNum ()).emplace_back ( frb, shape);
138138 } else {
139139 logger->error (DRT, 7 , " Unsupported region query add." );
140140 }
@@ -332,7 +332,7 @@ void frRegionQuery::Impl::addGRObj(grVia* via,
332332{
333333 odb::Rect frb = via->getBBox ();
334334 allShapes.at (via->getViaDef ()->getCutLayerNum ())
335- .push_back ( std::make_pair ( frb, via) );
335+ .emplace_back ( frb, via);
336336}
337337
338338void frRegionQuery::removeGRObj (grVia* via)
@@ -347,7 +347,7 @@ void frRegionQuery::Impl::addGRObj(grShape* shape,
347347{
348348 if (shape->typeId () == grcPathSeg) {
349349 odb::Rect frb = shape->getBBox ();
350- allShapes.at (shape->getLayerNum ()).push_back ( std::make_pair ( frb, shape) );
350+ allShapes.at (shape->getLayerNum ()).emplace_back ( frb, shape);
351351 } else {
352352 logger->error (DRT, 9 , " Unsupported region query add." );
353353 }
@@ -379,7 +379,7 @@ void frRegionQuery::Impl::add(frVia* via,
379379 odb::Rect frb = shape->getBBox ();
380380 xform.apply (frb);
381381 allShapes.at (via->getViaDef ()->getLayer1Num ())
382- .push_back ( std::make_pair ( frb, via) );
382+ .emplace_back ( frb, via);
383383 } else {
384384 logger->error (DRT, 11 , " Unsupported region query add." );
385385 }
@@ -390,7 +390,7 @@ void frRegionQuery::Impl::add(frVia* via,
390390 odb::Rect frb = shape->getBBox ();
391391 xform.apply (frb);
392392 allShapes.at (via->getViaDef ()->getLayer2Num ())
393- .push_back ( std::make_pair ( frb, via) );
393+ .emplace_back ( frb, via);
394394 } else {
395395 logger->error (DRT, 12 , " Unsupported region query add." );
396396 }
@@ -401,7 +401,7 @@ void frRegionQuery::Impl::add(frVia* via,
401401 odb::Rect frb = shape->getBBox ();
402402 xform.apply (frb);
403403 allShapes.at (via->getViaDef ()->getCutLayerNum ())
404- .push_back ( std::make_pair ( frb, via) );
404+ .emplace_back ( frb, via);
405405 } else {
406406 logger->error (DRT, 13 , " Unsupported region query add." );
407407 }
@@ -420,7 +420,7 @@ void frRegionQuery::Impl::addDRObj(frVia* via,
420420{
421421 odb::Rect frb = via->getBBox ();
422422 allShapes.at (via->getViaDef ()->getCutLayerNum ())
423- .push_back ( std::make_pair ( frb, via) );
423+ .emplace_back ( frb, via);
424424}
425425
426426void frRegionQuery::removeDRObj (frVia* via)
@@ -449,7 +449,7 @@ void frRegionQuery::Impl::add(frInstTerm* instTerm,
449449 odb::Rect frb = shape->getBBox ();
450450 xform.apply (frb);
451451 allShapes.at (static_cast <frShape*>(shape)->getLayerNum ())
452- .push_back ( std::make_pair ( frb, instTerm) );
452+ .emplace_back ( frb, instTerm);
453453 } else {
454454 logger->error (DRT, 14 , " Unsupported region query add." );
455455 }
@@ -466,7 +466,7 @@ void frRegionQuery::Impl::add(frBTerm* term,
466466 if (shape->typeId () == frcPathSeg || shape->typeId () == frcRect) {
467467 odb::Rect frb = shape->getBBox ();
468468 allShapes.at (static_cast <frShape*>(shape)->getLayerNum ())
469- .push_back ( std::make_pair ( frb, term) );
469+ .emplace_back ( frb, term);
470470 } else {
471471 logger->error (DRT, 15 , " Unsupported region query add." );
472472 }
@@ -486,7 +486,7 @@ void frRegionQuery::Impl::add(frInstBlockage* instBlk,
486486 odb::Rect frb = shape->getBBox ();
487487 xform.apply (frb);
488488 allShapes.at (static_cast <frShape*>(shape)->getLayerNum ())
489- .push_back ( std::make_pair ( frb, instBlk) );
489+ .emplace_back ( frb, instBlk);
490490 } else if (shape->typeId () == frcPolygon) {
491491 // Decompose the polygon to rectangles and store those
492492 // Convert the frPolygon to a Boost polygon
@@ -510,7 +510,7 @@ void frRegionQuery::Impl::add(frInstBlockage* instBlk,
510510 for (auto & rect : rects) {
511511 odb::Rect box (xl (rect), yl (rect), xh (rect), yh (rect));
512512 allShapes.at (static_cast <frShape*>(shape)->getLayerNum ())
513- .push_back ( std::make_pair ( box, instBlk) );
513+ .emplace_back ( box, instBlk);
514514 }
515515 } else {
516516 logger->error (DRT,
@@ -530,7 +530,7 @@ void frRegionQuery::Impl::add(frBlockage* blk,
530530 if (shape->typeId () == frcPathSeg || shape->typeId () == frcRect) {
531531 odb::Rect frb = shape->getBBox ();
532532 allShapes.at (static_cast <frShape*>(shape)->getLayerNum ())
533- .push_back ( std::make_pair ( frb, blk) );
533+ .emplace_back ( frb, blk);
534534 } else {
535535 logger->error (DRT, 17 , " Unsupported region query add." );
536536 }
@@ -542,7 +542,7 @@ void frRegionQuery::Impl::addGuide(frGuide* guide,
542542{
543543 odb::Rect frb = guide->getBBox ();
544544 for (int i = guide->getBeginLayerNum (); i <= guide->getEndLayerNum (); i++) {
545- allShapes.at (i).push_back ( std::make_pair ( frb, guide) );
545+ allShapes.at (i).emplace_back ( frb, guide);
546546 }
547547}
548548
@@ -551,15 +551,15 @@ void frRegionQuery::Impl::addRPin(frRPin* rpin,
551551{
552552 frLayerNum layerNum = rpin->getLayerNum ();
553553 odb::Rect frb = rpin->getBBox ();
554- allRPins.at (layerNum).push_back ( std::make_pair ( frb, rpin) );
554+ allRPins.at (layerNum).emplace_back ( frb, rpin);
555555}
556556
557557void frRegionQuery::Impl::addOrigGuide (frNet* net,
558558 const frRect& rect,
559559 ObjectsByLayer<frNet>& allShapes)
560560{
561561 odb::Rect frb = rect.getBBox ();
562- allShapes.at (rect.getLayerNum ()).push_back ( std::make_pair ( frb, net) );
562+ allShapes.at (rect.getLayerNum ()).emplace_back ( frb, net);
563563}
564564
565565void frRegionQuery::query (const box_t & boostb,
@@ -896,7 +896,7 @@ void frRegionQuery::Impl::initGRPin(
896896 Objects<frBlockObject> allGRPins;
897897 for (auto & [obj, pt] : in) {
898898 odb::Rect frb (pt.x (), pt.y (), pt.x (), pt.y ());
899- allGRPins.push_back ( std::make_pair ( frb, obj) );
899+ allGRPins.emplace_back ( frb, obj);
900900 }
901901 in.clear ();
902902 in.shrink_to_fit ();
0 commit comments