MeshPart: [skip ci] Fix several clazy issues:
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference] * Use multi-arg instead [-Wclazy-qstring-arg]
This commit is contained in:
@@ -272,7 +272,7 @@ private:
|
||||
proj.projectToMesh(shape, maxDist, polylines);
|
||||
|
||||
Py::List list;
|
||||
for (auto it : polylines) {
|
||||
for (const auto& it : polylines) {
|
||||
Py::List poly;
|
||||
for (auto jt : it.points) {
|
||||
Py::Vector v(jt);
|
||||
@@ -304,7 +304,7 @@ private:
|
||||
std::vector<MeshProjection::PolyLine> polylines;
|
||||
proj.projectParallelToMesh(shape, dir, polylines);
|
||||
Py::List list;
|
||||
for (auto it : polylines) {
|
||||
for (const auto& it : polylines) {
|
||||
Py::List poly;
|
||||
for (auto jt : it.points) {
|
||||
Py::Vector v(jt);
|
||||
@@ -354,7 +354,7 @@ private:
|
||||
proj.projectParallelToMesh(polylinesIn, dir, polylines);
|
||||
|
||||
Py::List list;
|
||||
for (auto it : polylines) {
|
||||
for (const auto& it : polylines) {
|
||||
Py::List poly;
|
||||
for (auto jt : it.points) {
|
||||
Py::Vector v(jt);
|
||||
|
||||
@@ -785,7 +785,7 @@ void MeshProjection::findSectionParameters(const TopoDS_Edge& edge, const Base::
|
||||
const MeshCore::MeshPointArray& points = _rcMesh.GetPoints();
|
||||
|
||||
Base::Vector3f res;
|
||||
for (auto it : facets) {
|
||||
for (const auto& it : facets) {
|
||||
for (int i=0; i<3; i++) {
|
||||
Base::Vector3f pt1 = points[it._aulPoints[i]];
|
||||
Base::Vector3f pt2 = points[it._aulPoints[(i+1)%3]];
|
||||
@@ -860,7 +860,7 @@ void MeshProjection::projectOnMesh(const std::vector<Base::Vector3f>& pointsIn,
|
||||
|
||||
const MeshCore::MeshFacetArray& facets = _rcMesh.GetFacets();
|
||||
const MeshCore::MeshPointArray& points = _rcMesh.GetPoints();
|
||||
for (auto it : facets) {
|
||||
for (const auto& it : facets) {
|
||||
for (int i=0; i<3; i++) {
|
||||
if (!it.HasNeighbour(i)) {
|
||||
boundaryPoints.push_back(points[it._aulPoints[i]]);
|
||||
@@ -985,7 +985,7 @@ void MeshProjection::projectParallelToMesh (const std::vector<PolyLine> &aEdges,
|
||||
|
||||
Base::SequencerLauncher seq( "Project curve on mesh", aEdges.size() );
|
||||
|
||||
for (auto it : aEdges) {
|
||||
for (const auto& it : aEdges) {
|
||||
std::vector<Base::Vector3f> points = it.points;
|
||||
|
||||
typedef std::pair<Base::Vector3f, MeshCore::FacetIndex> HitPoint;
|
||||
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
|
||||
MeshCore::MeshFacetArray faces;
|
||||
std::size_t numTriangles = 0;
|
||||
for (auto it : domains)
|
||||
for (const auto& it : domains)
|
||||
numTriangles += it.facets.size();
|
||||
faces.reserve(numTriangles);
|
||||
|
||||
@@ -265,7 +265,7 @@ public:
|
||||
|
||||
MeshCore::MeshPointArray verts;
|
||||
verts.resize(vertices.size());
|
||||
for (auto it : vertices)
|
||||
for (const auto& it : vertices)
|
||||
verts[it.i] = it.toPoint();
|
||||
|
||||
MeshCore::MeshKernel kernel;
|
||||
@@ -275,7 +275,7 @@ public:
|
||||
meshdata->swap(kernel);
|
||||
if (createSegm) {
|
||||
int index = 0;
|
||||
for (auto it : colorMap) {
|
||||
for (const auto& it : colorMap) {
|
||||
Mesh::Segment segm(meshdata, false);
|
||||
for (auto jt : it.second) {
|
||||
segm.addIndices(meshSegments[jt]);
|
||||
@@ -291,7 +291,7 @@ public:
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (auto it : meshSegments) {
|
||||
for (const auto& it : meshSegments) {
|
||||
meshdata->addSegment(it);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,8 +229,8 @@ void CmdMeshPartSection::activated(int)
|
||||
std::vector<Mesh::MeshObject::TPolylines> polylines;
|
||||
mesh->crossSections(sections, polylines);
|
||||
|
||||
for (auto it2 : polylines) {
|
||||
for (auto it3 : it2) {
|
||||
for (const auto& it2 : polylines) {
|
||||
for (const auto& it3 : it2) {
|
||||
Py::Tuple arg(1);
|
||||
Py::List list;
|
||||
for (auto it4 : it3) {
|
||||
|
||||
@@ -307,11 +307,11 @@ void Tessellation::process(int method, App::Document* doc, const std::list<App::
|
||||
"__mesh__.Mesh=MeshPart.meshFromShape(%4)\n"
|
||||
"__mesh__.Label=\"%5 (Meshed)\"\n"
|
||||
"del __doc__, __mesh__, __part__, __shape__\n")
|
||||
.arg(this->document)
|
||||
.arg(objname)
|
||||
.arg(subname)
|
||||
.arg(param)
|
||||
.arg(label);
|
||||
.arg(this->document,
|
||||
objname,
|
||||
subname,
|
||||
param,
|
||||
label);
|
||||
|
||||
Gui::Command::runCommand(Gui::Command::Doc, cmd.toUtf8());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user