Part: Fix several clazy issues:
* Maybe you meant to call Primitive::onChanged() instead [-Wclazy-skipped-base-method] * Maybe you meant to call Primitive::mustExecute() instead [-Wclazy-skipped-base-method] * Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference] * Use multi-arg instead [-Wclazy-qstring-arg] * Use midRef() instead [-Wclazy-qstring-ref]
This commit is contained in:
@@ -136,7 +136,7 @@ void BRepOffsetAPI_MakeOffsetFix::MakeWire(TopoDS_Shape& wire)
|
||||
}
|
||||
|
||||
std::list<TopoDS_Edge> edgeList;
|
||||
for (auto itLoc : myLocations) {
|
||||
for (const auto& itLoc : myLocations) {
|
||||
TopTools_ListOfShape newShapes = mkOffset.Generated(itLoc.first);
|
||||
// Check generated shapes for the vertexes, too
|
||||
TopExp_Explorer xpv(itLoc.first, TopAbs_VERTEX);
|
||||
|
||||
@@ -58,7 +58,7 @@ short Circle::mustExecute() const
|
||||
Angle2.isTouched() ||
|
||||
Radius.isTouched())
|
||||
return 1;
|
||||
return Part::Feature::mustExecute();
|
||||
return Part::Primitive::mustExecute();
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn *Circle::execute(void)
|
||||
@@ -85,7 +85,7 @@ void Circle::onChanged(const App::Property* prop)
|
||||
}
|
||||
}
|
||||
}
|
||||
Part::Feature::onChanged(prop);
|
||||
Part::Feature::onChanged(prop); // clazy:exclude=skipped-base-method
|
||||
}
|
||||
|
||||
void Circle::Restore(Base::XMLReader &reader)
|
||||
|
||||
@@ -208,7 +208,7 @@ void Geometry::Save(Base::Writer &writer) const
|
||||
|
||||
// Get the number of persistent extensions
|
||||
int counter = 0;
|
||||
for(auto att:extensions) {
|
||||
for(const auto& att : extensions) {
|
||||
if(att->isDerivedFrom(Part::GeometryPersistenceExtension::getClassTypeId()))
|
||||
counter++;
|
||||
}
|
||||
@@ -217,7 +217,7 @@ void Geometry::Save(Base::Writer &writer) const
|
||||
|
||||
writer.incInd();
|
||||
|
||||
for(auto att:extensions) {
|
||||
for(const auto& att : extensions) {
|
||||
if(att->isDerivedFrom(Part::GeometryPersistenceExtension::getClassTypeId()))
|
||||
std::static_pointer_cast<Part::GeometryPersistenceExtension>(att)->Save(writer);
|
||||
}
|
||||
@@ -282,7 +282,7 @@ std::vector<std::weak_ptr<const GeometryExtension>> Geometry::getExtensions() co
|
||||
|
||||
bool Geometry::hasExtension(Base::Type type) const
|
||||
{
|
||||
for( auto ext : extensions) {
|
||||
for(const auto& ext : extensions) {
|
||||
if(ext->getTypeId() == type)
|
||||
return true;
|
||||
}
|
||||
@@ -292,7 +292,7 @@ bool Geometry::hasExtension(Base::Type type) const
|
||||
|
||||
bool Geometry::hasExtension(const std::string & name) const
|
||||
{
|
||||
for( auto ext : extensions) {
|
||||
for(const auto& ext : extensions) {
|
||||
if(ext->getName() == name)
|
||||
return true;
|
||||
}
|
||||
@@ -302,7 +302,7 @@ bool Geometry::hasExtension(const std::string & name) const
|
||||
|
||||
std::weak_ptr<GeometryExtension> Geometry::getExtension(Base::Type type)
|
||||
{
|
||||
for( auto ext : extensions) {
|
||||
for(const auto& ext : extensions) {
|
||||
if(ext->getTypeId() == type)
|
||||
return ext;
|
||||
}
|
||||
@@ -312,7 +312,7 @@ std::weak_ptr<GeometryExtension> Geometry::getExtension(Base::Type type)
|
||||
|
||||
std::weak_ptr<GeometryExtension> Geometry::getExtension(const std::string & name)
|
||||
{
|
||||
for( auto ext : extensions) {
|
||||
for(const auto& ext : extensions) {
|
||||
if(ext->getName() == name)
|
||||
return ext;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user