Surface: 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:
wmayer
2022-07-25 10:01:49 +02:00
parent 2b039d67fe
commit 985f0a9132
8 changed files with 49 additions and 49 deletions

View File

@@ -245,12 +245,12 @@ void Filling::addConstraints(BRepFill_Filling& builder,
const App::PropertyLinkSubList& pointsList)
{
auto points = pointsList.getSubListValues();
for (auto it : points) {
for (const auto& it : points) {
App::DocumentObject* obj = it.first;
std::vector<std::string> sub = it.second;
if (obj && obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
const Part::TopoShape& shape = static_cast<Part::Feature*>(obj)->Shape.getShape();
for (auto jt : sub) {
for (const auto& jt : sub) {
TopoDS_Shape subShape = shape.getSubShape(jt.c_str());
if (!subShape.IsNull() && subShape.ShapeType() == TopAbs_VERTEX) {
gp_Pnt pnt = BRep_Tool::Pnt(TopoDS::Vertex(subShape));
@@ -288,7 +288,7 @@ App::DocumentObjectExecReturn *Filling::execute(void)
if (initFace && initFace->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
const Part::TopoShape& shape = static_cast<Part::Feature*>(initFace)->Shape.getShape();
std::vector<std::string> subNames = InitialFace.getSubValues();
for (auto it : subNames) {
for (const auto& it : subNames) {
TopoDS_Shape subShape = shape.getSubShape(it.c_str());
if (!subShape.IsNull() && subShape.ShapeType() == TopAbs_FACE) {
builder.LoadInitSurface(TopoDS::Face(subShape));