Skip to content

Commit 0072225

Browse files
committed
[algorithm] Modify loop to suppress warning
1 parent 193b847 commit 0072225

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/CollisionAlgorithm/algorithm/InsertionAlgorithm.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,13 @@ class SOFA_COLLISIONALGORITHM_API InsertionAlgorithm : public BaseAlgorithm
338338
auto findClosestProxOnShaft =
339339
Operations::FindClosestProximity::Operation::get(l_shaftGeom);
340340
auto projectOnShaft = Operations::Project::Operation::get(l_shaftGeom);
341-
for (int i = 0; i < m_couplingPts.size(); i++)
341+
for (const auto& cp : m_couplingPts)
342342
{
343343
const BaseProximity::SPtr shaftProx = findClosestProxOnShaft(
344-
m_couplingPts[i], l_shaftGeom.get(), projectOnShaft, getFilterFunc());
344+
cp, l_shaftGeom.get(), projectOnShaft, getFilterFunc());
345345
if (!shaftProx) continue;
346346
shaftProx->normalize();
347-
insertionOutput.add(shaftProx, m_couplingPts[i]);
347+
insertionOutput.add(shaftProx, cp);
348348
}
349349
// This is a final-frontier check: If there are coupling points stored, but the
350350
// findClosestProxOnShaf operation yields no proximities on the shaft, it could be

0 commit comments

Comments
 (0)