Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 11, 2006, 1:57:27 PM (19 years ago)
Author:
bensch
Message:

trunk: fixed most -Wall warnings… but there are still many missing :/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/static_model.cc

    r7732 r8316  
    386386  }
    387387  ++this->groupCount;
     388  return true;
    388389}
    389390
     
    558559  this->currentGroup->faceCount += this->currentGroup->currentFace->vertexCount -2;
    559560  this->faceCount += this->currentGroup->currentFace->vertexCount -2;
     561  return true;
    560562}
    561563
     
    591593  this->currentGroup->faceCount += this->currentGroup->currentFace->vertexCount - 2;
    592594  this->faceCount += this->currentGroup->currentFace->vertexCount -2;
     595  return true;
    593596}
    594597
     
    606609  if (this->currentGroup->faceCount == 0)
    607610    this->currentGroup->faceCount++;
     611  return true;
    608612}
    609613
     
    621625  if (this->currentGroup->faceCount == 0)
    622626    this->currentGroup->faceCount++;
     627  return true;
    623628}
    624629
     
    637642
    638643  Vector* normArray = new Vector [vertices.size()/3];
    639   for (int i=0; i<vertices.size()/3;i++)
     644  for (unsigned int i=0; i<vertices.size()/3;i++)
    640645    normArray[i] = Vector(.0,.0,.0);
    641646
    642   int firstTouch;
    643   int secondTouch;
    644647  Vector prevV;
    645648  Vector nextV;
     
    668671
    669672        curElem = firstElem;
    670         for (int j=0; j<tmpFace->vertexCount; j++)
     673        for (unsigned int j = 0; j < tmpFace->vertexCount; j++)
    671674        {
    672675          if (!(nextElem = curElem->next))
     
    696699  }
    697700
    698   for (int i=0; i < this->vertices.size()/3;i++)
     701  for (unsigned int i=0; i < this->vertices.size()/3;i++)
    699702  {
    700703    normArray[i].normalize();
     
    705708  }
    706709  delete[] normArray;
     710  return true;
    707711}
    708712
     
    741745          glEnd();
    742746        this->currentGroup->faceMode = 0;
    743         Material* tmpMat;
    744747        if (tmpFace->material != NULL)
    745748        {
     
    797800    this->currentGroup = this->currentGroup->next;
    798801  }
     802  return true;
    799803}
    800804
     
    933937  PRINTF(5)("importing grafical Element to openGL.\n");
    934938
    935   if (elem->texCoordNumber != -1)
    936   {
    937     if (likely(elem->texCoordNumber < this->pModelInfo.numTexCoor))
     939  if (elem->texCoordNumber > -1)
     940  {
     941    if (likely((unsigned int)elem->texCoordNumber < this->pModelInfo.numTexCoor))
    938942      glTexCoord2fv(&this->vTexture[0] + elem->texCoordNumber * 2);
    939943    else
     
    941945                elem->texCoordNumber, this->pModelInfo.numTexCoor);
    942946  }
    943   if (elem->normalNumber != -1)
    944   {
    945     if (likely(elem->normalNumber < this->pModelInfo.numNormals))
     947  if (elem->normalNumber > -1)
     948  {
     949    if (likely((unsigned int)elem->normalNumber < this->pModelInfo.numNormals))
    946950      glNormal3fv(&this->normals[0] + elem->normalNumber * 3);
    947951    else
     
    949953                elem->normalNumber, this->pModelInfo.numNormals);
    950954  }
    951   if (elem->vertexNumber != -1)
    952   {
    953     if (likely(elem->vertexNumber < this->pModelInfo.numVertices))
     955  if (elem->vertexNumber > -1)
     956  {
     957    if (likely((unsigned int)elem->vertexNumber < this->pModelInfo.numVertices))
    954958      glVertex3fv(&this->vertices[0]+ elem->vertexNumber * 3);
    955959    else
     
    958962  }
    959963
     964  return true;
    960965}
    961966
Note: See TracChangeset for help on using the changeset viewer.