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:
@@ -18,20 +18,62 @@
|
||||
// soit comme reference (-> valeur < 0), la reference elle-meme est ailleurs
|
||||
|
||||
|
||||
IGESData_DefSwitch::IGESData_DefSwitch () { theval = 0; }
|
||||
|
||||
void IGESData_DefSwitch::SetVoid () { theval = 0; }
|
||||
|
||||
void IGESData_DefSwitch::SetReference () { theval = -1; }
|
||||
|
||||
void IGESData_DefSwitch::SetRank (const Standard_Integer val)
|
||||
{ theval = val; }
|
||||
|
||||
IGESData_DefType IGESData_DefSwitch::DefType () const
|
||||
//=======================================================================
|
||||
//function : IGESData_DefSwitch
|
||||
//purpose : Default constructor.
|
||||
//=======================================================================
|
||||
IGESData_DefSwitch::IGESData_DefSwitch()
|
||||
: theval(0)
|
||||
{
|
||||
if (theval < 0) return IGESData_DefReference;
|
||||
if (theval > 0) return IGESData_DefValue;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetVoid
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void IGESData_DefSwitch::SetVoid()
|
||||
{
|
||||
theval = 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetReference
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void IGESData_DefSwitch::SetReference()
|
||||
{
|
||||
theval = -1;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetRank
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void IGESData_DefSwitch::SetRank(const Standard_Integer theRank)
|
||||
{
|
||||
theval = theRank;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DefType
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
IGESData_DefType IGESData_DefSwitch::DefType() const
|
||||
{
|
||||
if (theval < 0)
|
||||
return IGESData_DefReference;
|
||||
|
||||
if (theval > 0)
|
||||
return IGESData_DefValue;
|
||||
|
||||
return IGESData_DefVoid;
|
||||
}
|
||||
|
||||
Standard_Integer IGESData_DefSwitch::Value () const { return theval; }
|
||||
//=======================================================================
|
||||
//function : Value
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Integer IGESData_DefSwitch::Value() const
|
||||
{
|
||||
return theval;
|
||||
}
|
||||
|
@@ -24,21 +24,38 @@
|
||||
|
||||
#define ThisEntity Handle(IGESData_IGESEntity)::DownCast(This())
|
||||
|
||||
// theStatusNum :
|
||||
#define IGESFlagAssocs 131072
|
||||
#define IGESFlagProps 262144
|
||||
#define IGESFourStatus 65535
|
||||
#define IGESStatusField 15
|
||||
#define IGESShiftSubord 4
|
||||
#define IGESShiftUse 8
|
||||
#define IGESShiftHier 12
|
||||
namespace
|
||||
{
|
||||
static const Standard_Integer IGESFlagAssocs = 131072;
|
||||
static const Standard_Integer IGESFlagProps = 262144;
|
||||
static const Standard_Integer IGESFourStatus = 65535;
|
||||
static const Standard_Integer IGESStatusField = 15;
|
||||
static const Standard_Integer IGESShiftSubord = 4;
|
||||
static const Standard_Integer IGESShiftUse = 8;
|
||||
static const Standard_Integer IGESShiftHier = 12;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IGESData_IGESEntity
|
||||
//purpose : Default constructor.
|
||||
//=======================================================================
|
||||
IGESData_IGESEntity::IGESData_IGESEntity()
|
||||
: theType (0),
|
||||
theForm (0),
|
||||
theDefLevel (0),
|
||||
theStatusNum (0),
|
||||
theLWeightNum (0),
|
||||
theLWeightVal (0.0),
|
||||
theSubScriptN (0)
|
||||
{
|
||||
theRes1[0] = theRes2[0] = '\0';
|
||||
}
|
||||
|
||||
|
||||
IGESData_IGESEntity::IGESData_IGESEntity ()
|
||||
{ Clear(); theRes1[0] = theRes2[0] = '\0'; }
|
||||
|
||||
void IGESData_IGESEntity::Clear ()
|
||||
//=======================================================================
|
||||
//function : Clear
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void IGESData_IGESEntity::Clear ()
|
||||
{
|
||||
// Handle et DefSwitch
|
||||
theStructure.Nullify();
|
||||
|
Reference in New Issue
Block a user