mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0025622: CAST analysis: Avoid invocation of virtual Methods of the declared Class in a Constructor or Destructor
The Delete() methods have been deleted from the following classes: - Adaptor2d_Curve2d - Adaptor3d_Curve - Adaptor3d_Surface - AppBlend_Approx - AppCont_Function - AppParCurves_MultiCurve - AppParCurves_MultiPoint - ApproxInt_SvSurfaces - BRepPrim_OneAxis - BRepSweep_NumLinearRegularSweep - BRepSweep_Translation - BRepSweep_Trsf - DBC_BaseArray - GeomFill_Profiler - HatchGen_PointOnHatching - math_BFGS - math_FunctionSet - math_FunctionSetRoot - math_FunctionWithDerivative - math_MultipleVarFunction - math_MultipleVarFunctionWithHessian - math_MultipleVarFunctionWithGradient - math_Powell - math_NewtonMinimum - math_NewtonFunctionSetRoot - math_BissecNewton (just add virtual destructor) - math_FRPR - math_BrentMinimum (just add virtual destructor) - OSD_Chronometer - ProjLib_Projector Virtual methods Delete() or Destroy() of the transient inheritors is not changed (-> separate issue). Classes Graphic3d_DataStructureManager and PrsMgr_Presentation without changes.
This commit is contained in:
@@ -23,15 +23,10 @@ inherits MultipleVarFunction
|
||||
uses Vector from math
|
||||
|
||||
is
|
||||
|
||||
Delete(me:out) is redefined virtual;
|
||||
---C++: alias "Standard_EXPORT virtual ~math_MultipleVarFunctionWithGradient(){Delete();}"
|
||||
|
||||
NbVariables(me)
|
||||
---Purpose: Returns the number of variables of the function.
|
||||
|
||||
returns Integer
|
||||
is deferred;
|
||||
returns Integer is deferred;
|
||||
|
||||
|
||||
Value(me: in out; X: Vector; F: out Real)
|
||||
@@ -39,8 +34,7 @@ is
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean
|
||||
is deferred;
|
||||
returns Boolean is deferred;
|
||||
|
||||
|
||||
Gradient(me: in out; X: Vector; G: out Vector)
|
||||
@@ -48,8 +42,7 @@ is
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean
|
||||
is deferred;
|
||||
returns Boolean is deferred;
|
||||
|
||||
|
||||
Values(me: in out; X: Vector; F: out Real; G: out Vector)
|
||||
@@ -58,7 +51,6 @@ is
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean
|
||||
is deferred;
|
||||
returns Boolean is deferred;
|
||||
|
||||
end MultipleVarFunctionWithGradient;
|
||||
|
Reference in New Issue
Block a user