Commit bfa19860 authored by Cédric Traizet's avatar Cédric Traizet

PERF : use const reference instead of copy in the loop, as the iterated type is not necessarily int

parent 8771759a
...@@ -121,7 +121,7 @@ PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage > ...@@ -121,7 +121,7 @@ PersistentLabelImageSmallRegionMergingFilter< TInputLabelImage >
InputLabelType closestNeighbour = label; InputLabelType closestNeighbour = label;
auto const& statsLabel = m_LabelStatistic[ label ]; auto const& statsLabel = m_LabelStatistic[ label ];
for (auto neighbour : neighbours.second) for (auto const & neighbour : neighbours.second)
{ {
auto const & statsNeighbour = m_LabelStatistic[ neighbour ]; auto const & statsNeighbour = m_LabelStatistic[ neighbour ];
assert( statsLabel.Size() == statsNeighbour.Size() ); assert( statsLabel.Size() == statsNeighbour.Size() );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment