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

0031035: Coding - uninitialized class fields reported by Visual Studio Code Analysis

Added initialization of fields that had not initialization
Added default constructors to classes without constructors
This commit is contained in:
mkrylova
2020-07-17 13:08:31 +03:00
committed by bugmaster
parent 078f916446
commit d533dafb56
293 changed files with 1790 additions and 304 deletions

View File

@@ -43,6 +43,11 @@ public:
friend class ShapePersistent_BRep;
public:
//! Empty constructor.
PointRepresentation()
: myParameter(0.0)
{
}
//! Read persistent data from a file.
Standard_EXPORT virtual void Read (StdObjMgt_ReadData& theReadData);
//! Write persistent data to a file.
@@ -114,6 +119,10 @@ public:
friend class ShapePersistent_BRep;
public:
PointOnSurface()
: myParameter2(0.0)
{
}
virtual void Read (StdObjMgt_ReadData& theReadData);
virtual void Write (StdObjMgt_WriteData& theWriteData) const;
virtual Standard_CString PName() const { return "PBRep_PointOnSurface"; }
@@ -154,6 +163,11 @@ public:
friend class ShapePersistent_BRep;
public:
GCurve()
: myFirst(0.0),
myLast(0.0)
{
}
virtual void Read (StdObjMgt_ReadData& theReadData);
virtual void Write (StdObjMgt_WriteData& theWriteData) const;
virtual Standard_CString PName() const { return "PBRep_GCurve"; }
@@ -201,6 +215,10 @@ public:
friend class ShapePersistent_BRep;
public:
CurveOnClosedSurface()
: myContinuity(0)
{
}
virtual void Read (StdObjMgt_ReadData& theReadData);
virtual void Write (StdObjMgt_WriteData& theWriteData) const;
virtual void PChildren(StdObjMgt_Persistent::SequenceOfPersistent& theChildren) const;
@@ -296,6 +314,10 @@ public:
friend class ShapePersistent_BRep;
public:
CurveOn2Surfaces()
: myContinuity(0)
{
}
virtual void Read (StdObjMgt_ReadData& theReadData);
virtual void Write (StdObjMgt_WriteData& theWriteData) const;
virtual void PChildren(StdObjMgt_Persistent::SequenceOfPersistent& theChildren) const;
@@ -315,6 +337,10 @@ private:
friend class ShapePersistent_BRep;
public:
pTVertex()
: myTolerance(0.0)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{
pTBase::Read (theReadData);
@@ -347,6 +373,11 @@ private:
friend class ShapePersistent_BRep;
public:
pTEdge()
: myTolerance(0.0),
myFlags(0)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{
pTBase::Read (theReadData);
@@ -379,6 +410,11 @@ private:
friend class ShapePersistent_BRep;
public:
pTFace()
: myTolerance(0.0),
myNaturalRestriction(Standard_False)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{
pTBase::Read (theReadData);

View File

@@ -48,6 +48,10 @@ class ShapePersistent_Geom2d_Curve : public ShapePersistent_Geom2d
friend class ShapePersistent_Geom2d_Curve;
public:
pBezier()
: myRational(Standard_False)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{ theReadData >> myRational >> myPoles >> myWeights; }
inline void Write (StdObjMgt_WriteData& theWriteData) const
@@ -73,6 +77,12 @@ class ShapePersistent_Geom2d_Curve : public ShapePersistent_Geom2d
friend class ShapePersistent_Geom2d_Curve;
public:
pBSpline()
: myRational(Standard_False),
myPeriodic(Standard_False),
mySpineDegree(0)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{
theReadData >> myRational >> myPeriodic >> mySpineDegree;
@@ -110,6 +120,11 @@ class ShapePersistent_Geom2d_Curve : public ShapePersistent_Geom2d
friend class ShapePersistent_Geom2d_Curve;
public:
pTrimmed()
: myFirstU(0.0),
myLastU(0.0)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{ theReadData >> myBasisCurve >> myFirstU >> myLastU; }
inline void Write (StdObjMgt_WriteData& theWriteData) const
@@ -132,6 +147,10 @@ class ShapePersistent_Geom2d_Curve : public ShapePersistent_Geom2d
friend class ShapePersistent_Geom2d_Curve;
public:
pOffset()
: myOffsetValue(0.0)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{ theReadData >> myBasisCurve >> myOffsetValue; }
inline void Write (StdObjMgt_WriteData& theWriteData) const

View File

@@ -49,6 +49,10 @@ class ShapePersistent_Geom_Curve : private ShapePersistent_Geom
friend class ShapePersistent_Geom_Curve;
public:
pBezier()
: myRational(Standard_False)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{ theReadData >> myRational >> myPoles >> myWeights; }
inline void Write(StdObjMgt_WriteData& theWriteData)
@@ -73,6 +77,12 @@ class ShapePersistent_Geom_Curve : private ShapePersistent_Geom
friend class ShapePersistent_Geom_Curve;
public:
pBSpline()
: myRational(Standard_False),
myPeriodic(Standard_False),
mySpineDegree(0)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{
theReadData >> myRational >> myPeriodic >> mySpineDegree;
@@ -109,6 +119,11 @@ class ShapePersistent_Geom_Curve : private ShapePersistent_Geom
friend class ShapePersistent_Geom_Curve;
public:
pTrimmed()
: myFirstU(0.0),
myLastU(0.0)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{ theReadData >> myBasisCurve >> myFirstU >> myLastU; }
inline void Write (StdObjMgt_WriteData& theWriteData) const
@@ -130,6 +145,10 @@ class ShapePersistent_Geom_Curve : private ShapePersistent_Geom
friend class ShapePersistent_Geom_Curve;
public:
pOffset()
: myOffsetValue(0.0)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{ theReadData >> myBasisCurve >> myOffsetDirection >> myOffsetValue; }
inline void Write (StdObjMgt_WriteData& theWriteData) const

View File

@@ -112,6 +112,11 @@ class ShapePersistent_Geom_Surface : private ShapePersistent_Geom
friend class ShapePersistent_Geom_Surface;
public:
pBezier()
: myURational(Standard_False),
myVRational(Standard_False)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{ theReadData >> myURational >> myVRational >> myPoles >> myWeights; }
inline void Write (StdObjMgt_WriteData& theWriteData) const
@@ -138,6 +143,15 @@ class ShapePersistent_Geom_Surface : private ShapePersistent_Geom
friend class ShapePersistent_Geom_Surface;
public:
pBSpline()
: myURational(Standard_False),
myVRational(Standard_False),
myUPeriodic(Standard_False),
myVPeriodic(Standard_False),
myUSpineDegree(0),
myVSpineDegree(0)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{
theReadData >> myURational >> myVRational;
@@ -192,6 +206,13 @@ class ShapePersistent_Geom_Surface : private ShapePersistent_Geom
friend class ShapePersistent_Geom_Surface;
public:
pRectangularTrimmed()
: myFirstU(0.0),
myLastU(0.0),
myFirstV(0.0),
myLastV(0.0)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{
theReadData >> myBasisSurface;
@@ -222,6 +243,10 @@ class ShapePersistent_Geom_Surface : private ShapePersistent_Geom
friend class ShapePersistent_Geom_Surface;
public:
pOffset()
: myOffsetValue(0.0)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{ theReadData >> myBasisSurface >> myOffsetValue; }
inline void Write (StdObjMgt_WriteData& theWriteData) const

View File

@@ -72,6 +72,12 @@ class ShapePersistent_HSequence
typedef node<SequenceClass> Node;
public:
//! Empty constructor.
instance()
: mySize(0)
{
}
//! Read persistent data from a file.
Standard_EXPORT virtual void Read (StdObjMgt_ReadData& theReadData);

View File

@@ -35,6 +35,10 @@ class ShapePersistent_Poly : private StdObjMgt_SharedObject
friend class ShapePersistent_Poly;
public:
pPolygon2D()
: myDeflection(0.0)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{ theReadData >> myDeflection >> myNodes; }
inline void Write (StdObjMgt_WriteData& theWriteData) const
@@ -74,6 +78,10 @@ class ShapePersistent_Poly : private StdObjMgt_SharedObject
friend class ShapePersistent_Poly;
public:
pPolygonOnTriangulation()
: myDeflection(0.0)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{ theReadData >> myDeflection >> myNodes >> myParameters; }
inline void Write (StdObjMgt_WriteData& theWriteData) const
@@ -94,6 +102,10 @@ class ShapePersistent_Poly : private StdObjMgt_SharedObject
friend class ShapePersistent_Poly;
public:
pTriangulation()
: myDeflection(0.0)
{
}
inline void Read (StdObjMgt_ReadData& theReadData)
{ theReadData >> myDeflection >> myNodes >> myUVNodes >> myTriangles; }
inline void Write (StdObjMgt_WriteData& theWriteData) const