Skip to content

Commit de5f1a4

Browse files
cts: Avoid making a copy when iterating through sinks
Signed-off-by: Anton Blanchard <[email protected]>
1 parent 4bd364b commit de5f1a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
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);

0 commit comments

Comments
 (0)