File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ class GlobalRouter : public ant::GlobalRouteSource
149149 void readGuides (const char * file_name);
150150 void loadGuidesFromDB ();
151151 void saveGuidesFromFile (std::unordered_map<odb::dbNet*, Guides>& guides);
152- void saveGuides (std::vector<odb::dbNet*> nets);
152+ void saveGuides (const std::vector<odb::dbNet*>& nets);
153153 void writeSegments (const char * file_name);
154154 void readSegments (const char * file_name);
155155 bool netIsCovered (odb::dbNet* db_net, std::string& pins_not_covered);
Original file line number Diff line number Diff line change @@ -330,6 +330,7 @@ void GlobalRouter::globalRoute(bool save_guides,
330330 }
331331 if (save_guides) {
332332 std::vector<odb::dbNet*> nets;
333+ nets.reserve (block_->getNets ().size ());
333334 for (odb::dbNet* db_net : block_->getNets ()) {
334335 nets.push_back (db_net);
335336 }
@@ -2405,7 +2406,7 @@ void GlobalRouter::saveGuidesFromFile(
24052406 }
24062407}
24072408
2408- void GlobalRouter::saveGuides (std::vector<odb::dbNet*> nets)
2409+ void GlobalRouter::saveGuides (const std::vector<odb::dbNet*>& nets)
24092410{
24102411 int offset_x = grid_origin_.x ();
24112412 int offset_y = grid_origin_.y ();
@@ -4817,6 +4818,7 @@ std::vector<Net*> GlobalRouter::updateDirtyRoutes(bool save_guides)
48174818 std::vector<Net*> dirty_nets;
48184819 if (!dirty_nets_.empty ()) {
48194820 std::vector<odb::dbNet*> modified_nets;
4821+ modified_nets.reserve (dirty_nets.size ());
48204822 for (const Net* net : dirty_nets) {
48214823 modified_nets.push_back (net->getDbNet ());
48224824 }
You can’t perform that action at this time.
0 commit comments