Fixed warnings in Linux

--HG--
branch : feature
This commit is contained in:
Valentina Zhuravska 2015-10-01 05:05:21 +03:00
parent 92a7f21621
commit 15834562af
5 changed files with 41 additions and 29 deletions

View File

@ -65,7 +65,10 @@ public:
extrusion = L.extrusion;
attributes = L.attributes;
return *this;
if ( &L == this )
{
return *this;
}
}
/**

View File

@ -43,26 +43,26 @@
DL_Dxf::DL_Dxf()
: version(DL_VERSION_2000),
polylineLayer(),
vertices(NULL),
vertices(nullptr),
maxVertices(0),
vertexIndex(0),
knots(NULL),
knots(nullptr),
maxKnots(0),
knotIndex(0),
weights(NULL),
weights(nullptr),
weightIndex(0),
controlPoints(NULL),
controlPoints(nullptr),
maxControlPoints(0),
controlPointIndex(0),
fitPoints(NULL),
fitPoints(nullptr),
maxFitPoints(0),
fitPointIndex(0),
leaderVertices(NULL),
leaderVertices(nullptr),
maxLeaderVertices(0),
leaderVertexIndex(0),
@ -80,27 +80,27 @@ DL_Dxf::DL_Dxf()
*/
DL_Dxf::~DL_Dxf()
{
if (vertices!=NULL)
if (vertices!=nullptr)
{
delete[] vertices;
}
if (knots!=NULL)
if (knots!=nullptr)
{
delete[] knots;
}
if (controlPoints!=NULL)
if (controlPoints!=nullptr)
{
delete[] controlPoints;
}
if (fitPoints!=NULL)
if (fitPoints!=nullptr)
{
delete[] fitPoints;
}
if (weights!=NULL)
if (weights!=nullptr)
{
delete[] weights;
}
if (leaderVertices!=NULL)
if (leaderVertices!=nullptr)
{
delete[] leaderVertices;
}
@ -1617,7 +1617,7 @@ bool DL_Dxf::handleLWPolylineData(DL_CreationInterface* /*creationInterface*/)
maxVertices = toInt(groupValue);
if (maxVertices>0)
{
if (vertices!=NULL)
if (vertices!=nullptr)
{
delete[] vertices;
}
@ -1673,7 +1673,7 @@ bool DL_Dxf::handleSplineData(DL_CreationInterface* /*creationInterface*/)
maxKnots = toInt(groupValue);
if (maxKnots>0)
{
if (knots!=NULL)
if (knots!=nullptr)
{
delete[] knots;
}
@ -1693,11 +1693,11 @@ bool DL_Dxf::handleSplineData(DL_CreationInterface* /*creationInterface*/)
maxControlPoints = toInt(groupValue);
if (maxControlPoints>0)
{
if (controlPoints!=NULL)
if (controlPoints!=nullptr)
{
delete[] controlPoints;
}
if (weights!=NULL)
if (weights!=nullptr)
{
delete[] weights;
}
@ -1722,7 +1722,7 @@ bool DL_Dxf::handleSplineData(DL_CreationInterface* /*creationInterface*/)
maxFitPoints = toInt(groupValue);
if (maxFitPoints>0)
{
if (fitPoints!=NULL)
if (fitPoints!=nullptr)
{
delete[] fitPoints;
}
@ -1812,7 +1812,7 @@ bool DL_Dxf::handleLeaderData(DL_CreationInterface* /*creationInterface*/)
maxLeaderVertices = toInt(groupValue);
if (maxLeaderVertices>0)
{
if (leaderVertices!=NULL)
if (leaderVertices!=nullptr)
{
delete[] leaderVertices;
}
@ -2279,7 +2279,7 @@ bool DL_Dxf::handleHatchData(DL_CreationInterface* creationInterface)
}
return true;
default:
return true;
return false;
}
}
else
@ -2303,7 +2303,7 @@ bool DL_Dxf::handleHatchData(DL_CreationInterface* creationInterface)
hatchEdge.defined = true;
return true;
default:
return true;
return false;
}
}
@ -2332,7 +2332,7 @@ bool DL_Dxf::handleHatchData(DL_CreationInterface* creationInterface)
hatchEdge.defined = true;
return true;
default:
return true;
return false;
}
}
@ -2367,7 +2367,7 @@ bool DL_Dxf::handleHatchData(DL_CreationInterface* creationInterface)
hatchEdge.defined = true;
return true;
default:
return true;
return false;
}
}
@ -2449,7 +2449,7 @@ bool DL_Dxf::handleHatchData(DL_CreationInterface* creationInterface)
hatchEdge.endTangentY = toReal(groupValue);
return true;
default:
return true;
return false;
}
}
}

View File

@ -210,7 +210,10 @@ public:
appDictionaryHandle = L.appDictionaryHandle;
styleHandleStd = L.styleHandleStd;
return *this;
if ( &L == this )
{
return *this;
}
}
bool in(const std::string& file,

View File

@ -95,7 +95,7 @@ struct DXFLIB_EXPORT DL_LinetypeData
int flags,
int numberOfDashes,
double patternLength,
double* pattern = NULL
double* pattern = nullptr
)
: name(name),
description(description),
@ -129,7 +129,10 @@ struct DXFLIB_EXPORT DL_LinetypeData
patternLength = L.patternLength;
pattern = L.pattern;
return *this;
if ( &L == this )
{
return *this;
}
}
/** Linetype name */
@ -1279,7 +1282,7 @@ struct DXFLIB_EXPORT DL_DimOrdinateData
DL_DimOrdinateData(double ddpx1, double ddpy1, double ddpz1,
double ddpx2, double ddpy2, double ddpz2,
bool dxtype)
: dpx1(ddpx1), dpy1(ddpy1), dpz1(ddpz1),
: dpx1(ddpx1), dpy1(ddpy1), dpz1(ddpz1),
dpx2(ddpx2), dpy2(ddpy2), dpz2(ddpz2),
xtype(dxtype)
{

View File

@ -144,7 +144,10 @@ public:
setDirection(extru.direction[0], extru.direction[1], extru.direction[2]);
setElevation(extru.elevation);
return *this;
if ( &extru == this )
{
return *this;
}
}