1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025621: CAST analysis - Avoid constructors not supplying an initial value for all non-static data members

The constructors of classes from following files have been fixed to ensure that all non-static fields are initialized:

    Adaptor2d_Line2d.cxx
    Adaptor3d_IsoCurve.cxx
    Adaptor3d_OffsetCurve.cxx
    AdvApp2Var_ApproxAFunc2Var.cxx
    AIS_Dimension.cxx
    AIS_InteractiveContext.cxx
    Aspect_DisplayConnection.cxx
    BiTgte_CurveOnEdge.cxx
    BiTgte_CurveOnVertex.cxx
    BRepAdaptor_CompCurve.cxx
    BRepMesh_Circle.hxx
    BRepMesh_Delaun.cxx
    BRepToIGES_BREntity.cxx
    ChFi2d_AnaFilletAlgo.cxx
    ChFi2d_ChamferAPI.cxx
    ChFi2d_FilletAlgo.cxx
    ChFi2d_FilletAlgo.hxx
    Extrema_ExtPExtS.cxx
    Font_FTFont.cxx
    GccEnt_QualifiedCirc.cxx
    Geom2dAdaptor_Curve.cxx
    IGESData_IGESEntity.cxx
    IGESData_DefSwitch.cxx
    IGESToBRep_CurveAndSurface.cxx
    LDOM_XmlReader.cxx
    math_TrigonometricFunctionRoots.cxx
    NCollection_ListNode.hxx
    ProjLib_CompProjectedCurve.cxx
    ProjLib_ComputeApproxOnPolarSurface.cxx
    Select3D_Box2d.hxx
    Select3D_PointData.hxx
This commit is contained in:
azn
2014-12-25 10:00:13 +03:00
committed by abv
parent 460f4f693a
commit cbff1e5531
30 changed files with 713 additions and 400 deletions

View File

@@ -496,6 +496,10 @@ static Standard_Boolean InitialPoint(const gp_Pnt& Point,
//=======================================================================
ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve()
: myNbCurves(0),
myTolU (0.0),
myTolV (0.0),
myMaxDist (0.0)
{
}
@@ -504,15 +508,19 @@ ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve()
//purpose :
//=======================================================================
ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve(
const Handle(Adaptor3d_HSurface)& S,
const Handle(Adaptor3d_HCurve)& C,
const Standard_Real TolU,
const Standard_Real TolV)
: mySurface(S), myCurve(C), myNbCurves(0), myTolU(TolU), myTolV(TolV),
myMaxDist(-1)
ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve
(const Handle(Adaptor3d_HSurface)& theSurface,
const Handle(Adaptor3d_HCurve)& theCurve,
const Standard_Real theTolU,
const Standard_Real theTolV)
: mySurface (theSurface),
myCurve (theCurve),
myNbCurves(0),
mySequence(new ProjLib_HSequenceOfHSequenceOfPnt()),
myTolU (theTolU),
myTolV (theTolV),
myMaxDist (-1.0)
{
mySequence = new ProjLib_HSequenceOfHSequenceOfPnt();
Init();
}
@@ -521,16 +529,20 @@ ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve(
//purpose :
//=======================================================================
ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve(
const Handle(Adaptor3d_HSurface)& S,
const Handle(Adaptor3d_HCurve)& C,
const Standard_Real TolU,
const Standard_Real TolV,
const Standard_Real MaxDist)
: mySurface(S), myCurve(C), myNbCurves(0), myTolU(TolU), myTolV(TolV),
myMaxDist(MaxDist)
ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve
(const Handle(Adaptor3d_HSurface)& theSurface,
const Handle(Adaptor3d_HCurve)& theCurve,
const Standard_Real theTolU,
const Standard_Real theTolV,
const Standard_Real theMaxDist)
: mySurface (theSurface),
myCurve (theCurve),
myNbCurves(0),
mySequence(new ProjLib_HSequenceOfHSequenceOfPnt()),
myTolU (theTolU),
myTolV (theTolV),
myMaxDist (theMaxDist)
{
mySequence = new ProjLib_HSequenceOfHSequenceOfPnt();
Init();
}

View File

@@ -350,7 +350,11 @@ class ProjLib_PolarFunction : public AppCont_Function
//purpose :
//=======================================================================
ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface(){}
ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface()
: myProjIsDone(Standard_False),
myTolerance (-1.0)
{
}
//=======================================================================
@@ -359,15 +363,14 @@ ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface(){}
//=======================================================================
ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface
(const Handle(Adaptor2d_HCurve2d)& InitialCurve2d,
const Handle(Adaptor3d_HCurve)& Curve,
const Handle(Adaptor3d_HSurface)& S,
const Standard_Real tol3d):myProjIsDone(Standard_False) //OCC217
//const Standard_Real tolerance):myProjIsDone(Standard_False)
(const Handle(Adaptor2d_HCurve2d)& theInitialCurve2d,
const Handle(Adaptor3d_HCurve)& theCurve,
const Handle(Adaptor3d_HSurface)& theSurface,
const Standard_Real theTolerance3D)
: myProjIsDone(Standard_False),
myTolerance (theTolerance3D)
{
myTolerance = tol3d; //OCC217
//myTolerance = Max(Tolerance,Precision::PApproximation());
myBSpline = Perform(InitialCurve2d,Curve,S);
myBSpline = Perform(theInitialCurve2d, theCurve, theSurface);
}
//=======================================================================
//function : ProjLib_ComputeApproxOnPolarSurface
@@ -375,21 +378,23 @@ ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface
//=======================================================================
ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface
(const Handle(Adaptor2d_HCurve2d)& InitialCurve2d,
const Handle(Adaptor2d_HCurve2d)& InitialCurve2dBis,
const Handle(Adaptor3d_HCurve)& Curve,
const Handle(Adaptor3d_HSurface)& S,
const Standard_Real tol3d):myProjIsDone(Standard_False) //OCC217
//const Standard_Real tolerance):myProjIsDone(Standard_False)
{// InitialCurve2d and InitialCurve2dBis are two pcurves of the sewing
myTolerance = tol3d; //OCC217
//myTolerance = Max(tolerance,Precision::PApproximation());
Handle(Geom2d_BSplineCurve) bsc = Perform(InitialCurve2d,Curve,S);
(const Handle(Adaptor2d_HCurve2d)& theInitialCurve2d,
const Handle(Adaptor2d_HCurve2d)& theInitialCurve2dBis,
const Handle(Adaptor3d_HCurve)& theCurve,
const Handle(Adaptor3d_HSurface)& theSurface,
const Standard_Real theTolerance3D)
: myProjIsDone(Standard_False),
myTolerance (theTolerance3D)
{
// InitialCurve2d and InitialCurve2dBis are two pcurves of the sewing
Handle(Geom2d_BSplineCurve) bsc =
Perform(theInitialCurve2d, theCurve, theSurface);
if(myProjIsDone) {
gp_Pnt2d P2dproj, P2d, P2dBis;
P2dproj = bsc->StartPoint();
P2d = InitialCurve2d->Value(InitialCurve2d->FirstParameter());
P2dBis = InitialCurve2dBis->Value(InitialCurve2dBis->FirstParameter());
P2d = theInitialCurve2d->Value(theInitialCurve2d->FirstParameter());
P2dBis = theInitialCurve2dBis->Value(theInitialCurve2dBis->FirstParameter());
Standard_Real Dist, DistBis;
Dist = P2dproj.Distance(P2d);
@@ -414,17 +419,21 @@ ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface
//=======================================================================
ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface
(const Handle(Adaptor3d_HCurve)& Curve,
const Handle(Adaptor3d_HSurface)& S,
const Standard_Real tol3d):myProjIsDone(Standard_False) //OCC217
//const Standard_Real tolerance):myProjIsDone(Standard_False)
(const Handle(Adaptor3d_HCurve)& theCurve,
const Handle(Adaptor3d_HSurface)& theSurface,
const Standard_Real theTolerance3D)
: myProjIsDone(Standard_False),
myTolerance (theTolerance3D)
{
myTolerance = tol3d; //OCC217
//myTolerance = Max(tolerance,Precision::PApproximation());
const Handle(Adaptor2d_HCurve2d) InitCurve2d ;
myBSpline = Perform(InitCurve2d,Curve,S);
const Handle(Adaptor2d_HCurve2d) anInitCurve2d;
myBSpline = Perform(anInitCurve2d, theCurve, theSurface);
}
//=======================================================================
//function : Concat
//purpose :
//=======================================================================
static Handle(Geom2d_BSplineCurve) Concat(Handle(Geom2d_BSplineCurve) C1,
Handle(Geom2d_BSplineCurve) C2,
Standard_Real theUJump,