+ fix -Wnull-conversion, -Woverloaded-virtual, -Wlogical-not-parentheses, -Wsometimes-uninitialized
This commit is contained in:
@@ -54,6 +54,7 @@ App::Color calcColor(double value,double min, double max)
|
||||
return App::Color (0.0,1-((value-(min/2.0)) / (min/2.0)),1.0);
|
||||
if ( value < 0.0 )
|
||||
return App::Color (0.0,1.0,value/(min/2.0)) ;
|
||||
return App::Color (0,0,0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -99,4 +99,6 @@ int StepShape::read(const char* fileName)
|
||||
model->PrintLabel(entity,msg);
|
||||
std::cout << ";"<< entity->DynamicType()->Name() << std::endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -476,7 +476,7 @@ SoDetail* ViewProviderPartExt::getDetail(const char* subelement) const
|
||||
return detail;
|
||||
}
|
||||
|
||||
std::vector<Base::Vector3d> ViewProviderPartExt::getPickedPoints(const SoPickedPoint* pp) const
|
||||
std::vector<Base::Vector3d> ViewProviderPartExt::getModelPoints(const SoPickedPoint* pp) const
|
||||
{
|
||||
try {
|
||||
std::vector<Base::Vector3d> pts;
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
/// return a hit element to the selection path or 0
|
||||
virtual std::string getElement(const SoDetail*) const;
|
||||
virtual SoDetail* getDetail(const char*) const;
|
||||
virtual std::vector<Base::Vector3d> getPickedPoints(const SoPickedPoint *) const;
|
||||
virtual std::vector<Base::Vector3d> getModelPoints(const SoPickedPoint *) const;
|
||||
/// return the higlight lines for a given element or the whole shape
|
||||
virtual std::vector<Base::Vector3d> getSelectionShape(const char* Element) const;
|
||||
//@}
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -889,6 +889,8 @@ int System::solve(SubSystem *subsys, bool isFine, Algorithm alg)
|
||||
return solve_LM(subsys);
|
||||
else if (alg == DogLeg)
|
||||
return solve_DL(subsys);
|
||||
else
|
||||
return Failed;
|
||||
}
|
||||
|
||||
int System::solve_BFGS(SubSystem *subsys, bool isFine)
|
||||
|
||||
Reference in New Issue
Block a user