Skip to content

Commit 28f164a

Browse files
committed
grt: avoid creating a copy of an object when placing it in a vector
Signed-off-by: luis201420 <luisemv@precisioninno.com>
1 parent 7da1799 commit 28f164a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/grt/src/fastroute/src/maze.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,14 +1870,14 @@ void FastRouteCore::getOverflowPositions(
18701870
for (const auto& [x, y] : graph2d_.getUsedGridsH()) {
18711871
const int overflow = graph2d_.getOverflowH(x, y);
18721872
if (overflow > 0) {
1873-
overflow_pos.push_back(std::make_pair(odb::Point(x, y), true));
1873+
overflow_pos.emplace_back(odb::Point(x, y), true);
18741874
}
18751875
}
18761876
// Find vertical ggrids with congestion
18771877
for (const auto& [x, y] : graph2d_.getUsedGridsV()) {
18781878
const int overflow = graph2d_.getOverflowV(x, y);
18791879
if (overflow > 0) {
1880-
overflow_pos.push_back(std::make_pair(odb::Point(x, y), false));
1880+
overflow_pos.emplace_back(odb::Point(x, y), false);
18811881
}
18821882
}
18831883
}

0 commit comments

Comments
 (0)