+ fix -Wnull-conversion, -Woverloaded-virtual, -Wlogical-not-parentheses, -Wsometimes-uninitialized

This commit is contained in:
wmayer
2014-08-26 19:14:13 +02:00
parent 55cf9ddeaa
commit cc775f9254
30 changed files with 43 additions and 41 deletions

View File

@@ -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())