Added missing intializers to address Coverity issue

This commit is contained in:
Robert Osfield
2016-06-10 16:30:21 +01:00
parent 615114c900
commit 79dd8111a5
2 changed files with 13 additions and 7 deletions

View File

@@ -1313,9 +1313,9 @@ void* geomRead::Parse(trpgToken /*tok*/,trpgReadBuffer &buf)
// Get the necessary info out of the geom
trpgGeometry::PrimType primType;
int numPrims;
int numVert;
int numNorm;
int numPrims = 0;
int numVert = 0;
int numNorm = 0;
geom.GetPrimType(primType);
geom.GetNumPrims(numPrims);
geom.GetNumVertex(numVert);

View File

@@ -401,11 +401,17 @@ bool trpgGeometry::GetNumNormal(int32 &n) const
{
if (!isValid()) return false;
if (normDataFloat.size() != 0)
n = normDataFloat.size();
{
n = normDataFloat.size() / 3;
return true;
}
if (normDataDouble.size() != 0)
n = normDataDouble.size();
n = n / 3;
return true;
{
n = normDataDouble.size() / 3;
return true;
}
n = 0;
return false;
}
bool trpgGeometry::GetNormals(float32 *v) const
{