Part: Fix several coverity issues:
* CID 350581: Structurally dead code * CID 350620: Structurally dead code * CID 350563: Big parameter passed by value * CID 350552: Uncaught exception * CID 305193: Uncaught exception * CID 350556: Uninitialized scalar field * CID 350579: Uninitialized pointer read
This commit is contained in:
@@ -406,7 +406,7 @@ void ExtrusionHelper::checkInnerWires(std::vector<bool>& isInnerWire, const gp_D
|
||||
// recursively call the function until all wires are checked
|
||||
if (numCheckWires > 1)
|
||||
checkInnerWires(isInnerWire, direction, checklist, !forInner, prisms);
|
||||
};
|
||||
}
|
||||
|
||||
void ExtrusionHelper::createTaperedPrismOffset(TopoDS_Wire sourceWire,
|
||||
const gp_Vec& translation,
|
||||
@@ -452,11 +452,9 @@ void ExtrusionHelper::createTaperedPrismOffset(TopoDS_Wire sourceWire,
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
throw Base::RuntimeError(e.what());
|
||||
result = TopoDS_Wire();
|
||||
}
|
||||
if (!mkOffset.IsDone()) {
|
||||
Standard_Failure::Raise("Extrusion: Offset could not be created");
|
||||
result = TopoDS_Wire();
|
||||
}
|
||||
if (numEdges == 1) {
|
||||
// we need to move the offset wire first back to its original position
|
||||
|
||||
@@ -238,9 +238,6 @@ PyObject* GeometrySurfacePy::getDN(PyObject *args)
|
||||
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PyErr_SetString(PartExceptionOCCError, "Geometry is not a surface");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PyObject* GeometrySurfacePy::value(PyObject *args)
|
||||
|
||||
@@ -663,7 +663,7 @@ Handle(Poly_Polygon3D) Part::Tools::polygonOfEdge(const TopoDS_Edge& edge, TopLo
|
||||
// helper function to use in getNormal, here we pass the local properties
|
||||
// of the surface given by the #LProp_SLProps objects
|
||||
template <typename T>
|
||||
void getNormalBySLProp(T prop, double u, double v, Standard_Real lastU, Standard_Real lastV,
|
||||
void getNormalBySLProp(T& prop, double u, double v, Standard_Real lastU, Standard_Real lastV,
|
||||
const Standard_Real tol, gp_Dir& dir, Standard_Boolean& done)
|
||||
{
|
||||
if (prop.D1U().Magnitude() > tol &&
|
||||
|
||||
@@ -195,7 +195,12 @@ DlgProjectionOnSurface::~DlgProjectionOnSurface()
|
||||
}
|
||||
for (auto it : m_shapeVec)
|
||||
{
|
||||
higlight_object(it.partFeature, it.partName, false, 0);
|
||||
try {
|
||||
higlight_object(it.partFeature, it.partName, false, 0);
|
||||
}
|
||||
catch (Standard_NoSuchObject& e) {
|
||||
Base::Console().Warning("DlgProjectionOnSurface::~DlgProjectionOnSurface: %s", e.GetMessageString());
|
||||
}
|
||||
}
|
||||
Gui::Selection().rmvSelectionGate();
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ void SectionCut::startCutting(bool isInitial)
|
||||
// refresh documents list
|
||||
onRefreshCutPBclicked();
|
||||
|
||||
App::DocumentObject* anObject;
|
||||
App::DocumentObject* anObject = nullptr;
|
||||
std::vector<App::DocumentObjectT>::iterator it;
|
||||
|
||||
// lambda function to delete objects
|
||||
|
||||
@@ -119,6 +119,7 @@ TaskAttacher::TaskAttacher(Gui::ViewProviderDocumentObject *ViewProvider, QWidge
|
||||
, ViewProvider(ViewProvider)
|
||||
, ui(new Ui_TaskAttacher)
|
||||
, visibilityFunc(visFunc)
|
||||
, completed(false)
|
||||
{
|
||||
//check if we are attachable
|
||||
if (!ViewProvider->getObject()->hasExtension(Part::AttachExtension::getExtensionClassTypeId()))
|
||||
|
||||
Reference in New Issue
Block a user