PVS: V688 A local variable possesses the same name as one of the class members, which can result in a confusion

This commit is contained in:
wmayer
2019-03-13 11:58:43 +01:00
parent 4e018c506b
commit 51811e4bf4
8 changed files with 156 additions and 163 deletions

View File

@@ -143,10 +143,10 @@ bool ReferenceSelection::allow(App::Document* pDoc, App::DocumentObject* pObj, c
if (edge && subName.size() > 4 && subName.substr(0,4) == "Edge") {
const Part::TopoShape &shape = static_cast<const Part::Feature*>(pObj)->Shape.getValue();
TopoDS_Shape sh = shape.getSubShape(subName.c_str());
const TopoDS_Edge& edge = TopoDS::Edge(sh);
if (!edge.IsNull()) {
const TopoDS_Edge& edgeShape = TopoDS::Edge(sh);
if (!edgeShape.IsNull()) {
if (planar) {
BRepAdaptor_Curve adapt(edge);
BRepAdaptor_Curve adapt(edgeShape);
if (adapt.GetType() == GeomAbs_Line)
return true;
} else {