Skip to content

Commit 2e7a949

Browse files
authored
Merge pull request #2751 from fgaray/copy_warnings
Prevent warnings about unneeded copy in for loops
2 parents 329e987 + bda0da0 commit 2e7a949

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cts/src/Clock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Box<double> Clock::computeSinkRegionClustered(
9595
auto yMin = std::numeric_limits<float>::max();
9696
auto yMax = std::numeric_limits<float>::lowest();
9797

98-
for (const auto [sinkX, sinkY] : sinks) {
98+
for (const auto& [sinkX, sinkY] : sinks) {
9999
xMin = std::min(xMin, sinkX);
100100
xMax = std::max(xMax, sinkX);
101101
yMin = std::min(yMin, sinkY);

src/mpl2/src/hier_rtlmp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3034,7 +3034,7 @@ void HierRTLMP::multiLevelMacroPlacement(Cluster* parent)
30343034
}
30353035
// add the virtual connections (the weight related to IOs and macros belong to
30363036
// the same cluster)
3037-
for (const auto [cluster1, cluster2] : parent->getVirtualConnections()) {
3037+
for (const auto& [cluster1, cluster2] : parent->getVirtualConnections()) {
30383038
BundledNet net(soft_macro_id_map[cluster_map_[cluster1]->getName()],
30393039
soft_macro_id_map[cluster_map_[cluster2]->getName()],
30403040
virtual_weight_);

0 commit comments

Comments
 (0)