dxflib: Fix static analyzer warnings
This commit is contained in:
parent
66f00746c9
commit
3d4e61ddb8
|
@ -66,6 +66,17 @@ DL_Dxf::DL_Dxf()
|
||||||
leaderVertices = NULL;
|
leaderVertices = NULL;
|
||||||
maxLeaderVertices = 0;
|
maxLeaderVertices = 0;
|
||||||
leaderVertexIndex = 0;
|
leaderVertexIndex = 0;
|
||||||
|
|
||||||
|
// Aux members, initialized here to avoid warnings in analysers
|
||||||
|
firstHatchLoop = true;
|
||||||
|
xRecordValues = false;
|
||||||
|
groupCode = 0;
|
||||||
|
currentObjectType = 0;
|
||||||
|
settingValue[0] = 0;
|
||||||
|
firstCall = true;
|
||||||
|
libVersion = 0;
|
||||||
|
appDictionaryHandle = 0;
|
||||||
|
styleHandleStd = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -574,17 +574,17 @@ struct DXFLIB_EXPORT DL_SplineData
|
||||||
* Constructor.
|
* Constructor.
|
||||||
* Parameters: see member variables.
|
* Parameters: see member variables.
|
||||||
*/
|
*/
|
||||||
DL_SplineData( int adegree,
|
DL_SplineData( int adegree, int anKnots, int anControl, int anFit, int aflags ) :
|
||||||
int anKnots,
|
degree( adegree ), nKnots( anKnots ), nControl( anControl ),
|
||||||
int anControl,
|
nFit( anFit ), flags( aflags )
|
||||||
int anFit,
|
|
||||||
int aflags ) :
|
|
||||||
degree( adegree ),
|
|
||||||
nKnots( anKnots ),
|
|
||||||
nControl( anControl ),
|
|
||||||
nFit( anFit ),
|
|
||||||
flags( aflags )
|
|
||||||
{
|
{
|
||||||
|
// Aux members, initialized here to avoid warnings in analyers
|
||||||
|
tangentStartX = 0.0;
|
||||||
|
tangentStartY = 0.0;
|
||||||
|
tangentStartZ = 0.0;
|
||||||
|
tangentEndX = 0.0;
|
||||||
|
tangentEndY = 0.0;
|
||||||
|
tangentEndZ = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Degree of the spline curve. */
|
/*! Degree of the spline curve. */
|
||||||
|
@ -1736,6 +1736,17 @@ struct DXFLIB_EXPORT DL_HatchEdgeData
|
||||||
*/
|
*/
|
||||||
DL_HatchEdgeData() : defined( false ), x1( 0.0 ), y1( 0.0 ), x2( 0.0 ), y2( 0.0 )
|
DL_HatchEdgeData() : defined( false ), x1( 0.0 ), y1( 0.0 ), x2( 0.0 ), y2( 0.0 )
|
||||||
{
|
{
|
||||||
|
// Other members, initialized here to avoid warnings in analysers
|
||||||
|
type = 0;
|
||||||
|
cx = cy = radius = 0.0;
|
||||||
|
angle1 = angle2 = 0.0;
|
||||||
|
mx = my = ratio = 0.0;
|
||||||
|
ccw = false;
|
||||||
|
degree = 0;
|
||||||
|
rational = false;
|
||||||
|
periodic = false;
|
||||||
|
nKnots = nControl = nFit = 0;
|
||||||
|
startTangentX = startTangentY = endTangentX = endTangentY = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1743,13 +1754,19 @@ struct DXFLIB_EXPORT DL_HatchEdgeData
|
||||||
* Parameters: see member variables.
|
* Parameters: see member variables.
|
||||||
*/
|
*/
|
||||||
DL_HatchEdgeData( double ax1, double ay1, double ax2, double ay2 ) :
|
DL_HatchEdgeData( double ax1, double ay1, double ax2, double ay2 ) :
|
||||||
defined( true ),
|
defined( true ), type( 1 ),
|
||||||
type( 1 ),
|
x1( ax1 ), y1( ay1 ), x2( ax2 ), y2( ay2 )
|
||||||
x1( ax1 ),
|
|
||||||
y1( ay1 ),
|
|
||||||
x2( ax2 ),
|
|
||||||
y2( ay2 )
|
|
||||||
{
|
{
|
||||||
|
// Other members, initialized here to avoid warnings in analysers
|
||||||
|
cx = cy = radius = 0.0;
|
||||||
|
angle1 = angle2 = 0.0;
|
||||||
|
mx = my = ratio = 0.0;
|
||||||
|
ccw = false;
|
||||||
|
degree = 0;
|
||||||
|
rational = false;
|
||||||
|
periodic = false;
|
||||||
|
nKnots = nControl = nFit = 0;
|
||||||
|
startTangentX = startTangentY = endTangentX = endTangentY = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1757,77 +1774,66 @@ struct DXFLIB_EXPORT DL_HatchEdgeData
|
||||||
* Parameters: see member variables.
|
* Parameters: see member variables.
|
||||||
*/
|
*/
|
||||||
DL_HatchEdgeData( double acx, double acy,
|
DL_HatchEdgeData( double acx, double acy,
|
||||||
double aradius,
|
double aradius, double aangle1, double aangle2, bool accw ) :
|
||||||
double aangle1, double aangle2,
|
defined( true ), type( 2 ),
|
||||||
bool accw ) :
|
cx( acx ), cy( acy ), radius( aradius ), angle1( aangle1 ),
|
||||||
defined( true ),
|
angle2( aangle2 ), ccw( accw )
|
||||||
type( 2 ),
|
|
||||||
cx( acx ),
|
|
||||||
cy( acy ),
|
|
||||||
radius( aradius ),
|
|
||||||
angle1( aangle1 ),
|
|
||||||
angle2( aangle2 ),
|
|
||||||
ccw( accw )
|
|
||||||
{
|
{
|
||||||
|
// Other members, initialized here to avoid warnings in analysers
|
||||||
|
x1 = y1 = x2 = y2 = 0.0;
|
||||||
|
mx = my = ratio = 0.0;
|
||||||
|
degree = 0;
|
||||||
|
rational = false;
|
||||||
|
periodic = false;
|
||||||
|
nKnots = nControl = nFit = 0;
|
||||||
|
startTangentX = startTangentY = endTangentX = endTangentY = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for an ellipse arc edge.
|
* Constructor for an ellipse arc edge.
|
||||||
* Parameters: see member variables.
|
* Parameters: see member variables.
|
||||||
*/
|
*/
|
||||||
DL_HatchEdgeData( double acx, double acy,
|
DL_HatchEdgeData( double acx, double acy, double amx, double amy,
|
||||||
double amx, double amy,
|
double aratio, double aangle1, double aangle2, bool accw ) :
|
||||||
double aratio,
|
defined( true ), type( 3 ), cx( acx ), cy( acy ),
|
||||||
double aangle1, double aangle2,
|
angle1( aangle1 ), angle2( aangle2 ), ccw( accw ),
|
||||||
bool accw ) :
|
mx( amx ), my( amy ), ratio( aratio )
|
||||||
defined( true ),
|
|
||||||
type( 3 ),
|
|
||||||
cx( acx ),
|
|
||||||
cy( acy ),
|
|
||||||
angle1( aangle1 ),
|
|
||||||
angle2( aangle2 ),
|
|
||||||
ccw( accw ),
|
|
||||||
mx( amx ),
|
|
||||||
my( amy ),
|
|
||||||
ratio( aratio )
|
|
||||||
{
|
{
|
||||||
|
// OAther members, initialized here to avoid warnings in analysers
|
||||||
|
x1 = y1 = x2 = y2 = 0.0;
|
||||||
|
radius = 0.0;
|
||||||
|
degree = 0;
|
||||||
|
rational = false;
|
||||||
|
periodic = false;
|
||||||
|
nKnots = nControl = nFit = 0;
|
||||||
|
startTangentX = startTangentY = endTangentX = endTangentY = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for a spline edge.
|
* Constructor for a spline edge.
|
||||||
* Parameters: see member variables.
|
* Parameters: see member variables.
|
||||||
*/
|
*/
|
||||||
DL_HatchEdgeData( unsigned int adegree,
|
DL_HatchEdgeData( unsigned int adegree, bool arational, bool a_periodic,
|
||||||
bool arational,
|
unsigned int anKnots, unsigned int anControl, unsigned int anFit,
|
||||||
bool a_periodic,
|
|
||||||
unsigned int anKnots,
|
|
||||||
unsigned int anControl,
|
|
||||||
unsigned int anFit,
|
|
||||||
const std::vector<double>& aknots,
|
const std::vector<double>& aknots,
|
||||||
const std::vector<std::vector<double> >& acontrolPoints,
|
const std::vector<std::vector<double> >& acontrolPoints,
|
||||||
const std::vector<std::vector<double> >& afitPoints,
|
const std::vector<std::vector<double> >& afitPoints,
|
||||||
const std::vector<double>& aweights,
|
const std::vector<double>& aweights,
|
||||||
double astartTangentX,
|
double astartTangentX, double astartTangentY,
|
||||||
double astartTangentY,
|
double aendTangentX, double aendTangentY ) :
|
||||||
double aendTangentX,
|
defined( true ), type( 4 ), degree( adegree ),
|
||||||
double aendTangentY ) :
|
rational( arational ), periodic( a_periodic ), nKnots( anKnots ),
|
||||||
defined( true ),
|
nControl( anControl ), nFit( anFit ), controlPoints( acontrolPoints ),
|
||||||
type( 4 ),
|
knots( aknots ), weights( aweights ), fitPoints( afitPoints ),
|
||||||
degree( adegree ),
|
startTangentX( astartTangentX ), startTangentY( astartTangentY ),
|
||||||
rational( arational ),
|
endTangentX( aendTangentX ), endTangentY( aendTangentY )
|
||||||
periodic( a_periodic ),
|
|
||||||
nKnots( anKnots ),
|
|
||||||
nControl( anControl ),
|
|
||||||
nFit( anFit ),
|
|
||||||
controlPoints( acontrolPoints ),
|
|
||||||
knots( aknots ),
|
|
||||||
weights( aweights ),
|
|
||||||
fitPoints( afitPoints ),
|
|
||||||
startTangentX( astartTangentX ),
|
|
||||||
startTangentY( astartTangentY ),
|
|
||||||
endTangentX( aendTangentX ),
|
|
||||||
endTangentY( aendTangentY )
|
|
||||||
{
|
{
|
||||||
|
// Ather members, initialized here to avoid warnings in analysers
|
||||||
|
x1 = y1 = x2 = y2 = 0.0;
|
||||||
|
cx = cy = radius = 0.0;
|
||||||
|
angle1 = angle2 = 0.0;
|
||||||
|
mx = my = ratio = 0.0;
|
||||||
|
ccw = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue