+ fix -Wnull-conversion, -Woverloaded-virtual, -Wlogical-not-parentheses, -Wsometimes-uninitialized
This commit is contained in:
@@ -146,7 +146,7 @@ App::DocumentObjectExecReturn *Draft::execute(void)
|
||||
TopoDS_Shape face = TopShape.getSubShape(SubVals[0].c_str());
|
||||
TopTools_IndexedMapOfShape mapOfEdges;
|
||||
TopExp::MapShapes(face, TopAbs_EDGE, mapOfEdges);
|
||||
bool found;
|
||||
bool found = false;
|
||||
|
||||
for (int i = 1; i <= mapOfEdges.Extent(); i++) {
|
||||
// Note: What happens if mapOfEdges(i) is the degenerated edge of a cone?
|
||||
@@ -212,7 +212,7 @@ App::DocumentObjectExecReturn *Draft::execute(void)
|
||||
if (refEdge.IsNull())
|
||||
throw Base::Exception("Failed to extract neutral plane reference edge");
|
||||
BRepAdaptor_Curve c(refEdge);
|
||||
if (!c.GetType() == GeomAbs_Line)
|
||||
if (c.GetType() != GeomAbs_Line)
|
||||
throw Base::Exception("Neutral plane reference edge must be linear");
|
||||
double a = c.Line().Angle(gp_Lin(c.Value(c.FirstParameter()), pullDirection));
|
||||
if (std::fabs(a - M_PI_2) > Precision::Confusion())
|
||||
|
||||
Reference in New Issue
Block a user