MeshPart: modernize C++: use range-based for loop

This commit is contained in:
wmayer
2023-08-15 11:58:18 +02:00
committed by wwmayer
parent 516795c986
commit 7c42bc5e60
6 changed files with 79 additions and 80 deletions

View File

@@ -101,8 +101,8 @@ void MeshAlgos::offsetSpecial2(MeshCore::MeshKernel* Mesh, float fSize)
if(fliped.empty())
break;
for(std::set<MeshCore::FacetIndex>::iterator It= fliped.begin();It!=fliped.end();++It)
alg.CollapseFacet(*It);
for(MeshCore::FacetIndex It : fliped)
alg.CollapseFacet(It);
fliped.clear();
}
@@ -448,9 +448,9 @@ void MeshAlgos::cutByCurve(MeshCore::MeshKernel* pMesh,const std::vector<CurvePr
{
MeshTopoAlgorithm cTopAlg(*pMesh);
for (std::vector<CurveProjector::FaceSplitEdge>::const_iterator it = vSplitEdges.begin();it!=vSplitEdges.end();++it)
for (const auto & it : vSplitEdges)
{
cTopAlg.SplitFacet( it->ulFaceIndex, it->p1, it->p2 );
cTopAlg.SplitFacet( it.ulFaceIndex, it.p1, it.p2 );
}
}