1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +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

@@ -92,6 +92,7 @@ BRepMesh_Delaun::BRepMesh_Delaun (
myCircles (new NCollection_IncAllocator(
IMeshData::MEMORY_BLOCK_SIZE_HUGE))
{
memset (mySupVert, 0, sizeof (mySupVert));
if (isFillCircles)
{
InitCirclesTool (theCellsCountU, theCellsCountV);
@@ -106,6 +107,7 @@ BRepMesh_Delaun::BRepMesh_Delaun(IMeshData::Array1OfVertexOfDelaun& theVertices)
: myCircles (theVertices.Length(), new NCollection_IncAllocator(
IMeshData::MEMORY_BLOCK_SIZE_HUGE))
{
memset (mySupVert, 0, sizeof (mySupVert));
if ( theVertices.Length() > 2 )
{
myMeshData = new BRepMesh_DataStructureOfDelaun(
@@ -126,6 +128,7 @@ BRepMesh_Delaun::BRepMesh_Delaun(
myCircles ( theVertices.Length(), new NCollection_IncAllocator(
IMeshData::MEMORY_BLOCK_SIZE_HUGE))
{
memset (mySupVert, 0, sizeof (mySupVert));
if ( theVertices.Length() > 2 )
{
Init( theVertices );
@@ -143,6 +146,7 @@ BRepMesh_Delaun::BRepMesh_Delaun(
myCircles ( theVertexIndices.Length(), new NCollection_IncAllocator(
IMeshData::MEMORY_BLOCK_SIZE_HUGE))
{
memset (mySupVert, 0, sizeof (mySupVert));
perform(theVertexIndices);
}
@@ -158,6 +162,7 @@ BRepMesh_Delaun::BRepMesh_Delaun (const Handle (BRepMesh_DataStructureOfDelaun)&
myCircles (theVertexIndices.Length (), new NCollection_IncAllocator(
IMeshData::MEMORY_BLOCK_SIZE_HUGE))
{
memset (mySupVert, 0, sizeof (mySupVert));
perform (theVertexIndices, theCellsCountU, theCellsCountV);
}

View File

@@ -34,7 +34,8 @@ public:
//! Constructor.
BRepMesh_DelaunayDeflectionControlMeshAlgo()
: myMaxSqDeflection(-1.),
myIsAllDegenerated(Standard_False)
myIsAllDegenerated(Standard_False),
myCircles(NULL)
{
}
@@ -107,6 +108,11 @@ private:
//! Contains geometrical data related to node of triangle.
struct TriangleNodeInfo
{
TriangleNodeInfo()
: isFrontierLink(Standard_False)
{
}
gp_XY Point2d;
gp_XYZ Point;
Standard_Boolean isFrontierLink;

View File

@@ -45,6 +45,12 @@ public:
//! Constructor. Initializes empty provider.
BRepMesh_EdgeParameterProvider()
: myIsSameParam(Standard_False),
myFirstParam(0.0),
myOldFirstParam(0.0),
myScale(0.0),
myCurParam(0.0),
myFoundParam(0.0)
{
}

View File

@@ -103,6 +103,7 @@ namespace
BndBox2dTreeSelector(const Standard_Real theTolerance)
: myMaxLoopSize(M_PI * theTolerance * theTolerance),
mySelfSegmentIndex(-1),
mySegment(0),
myIndices(256, new NCollection_IncAllocator(IMeshData::MEMORY_BLOCK_SIZE_HUGE))
{
}

View File

@@ -38,8 +38,9 @@ public: //! @name mesher API
gp_Pnt2d* Point2; // / using indices.
Segment()
: Point1(NULL)
, Point2(NULL)
: EdgePtr(NULL),
Point1(NULL),
Point2(NULL)
{
}

View File

@@ -44,7 +44,10 @@ namespace
myParamsForbiddenToRemove(theParamsForbiddenToRemove),
myControlParamsForbiddenToRemove(theControlParamsForbiddenToRemove),
myAllocator(new NCollection_IncAllocator(IMeshData::MEMORY_BLOCK_SIZE_HUGE)),
myControlParamsToRemove(new IMeshData::MapOfReal(1, myAllocator))
myControlParamsToRemove(new IMeshData::MapOfReal(1, myAllocator)),
myCurrParam(0.0),
myCurrControlParam(0.0),
myPrevControlParam(0.0)
{
}

View File

@@ -28,6 +28,7 @@ public:
//! Constructor.
BRepMesh_NURBSRangeSplitter()
: mySurfaceType(GeomAbs_OtherSurface)
{
}