Skip to content

Commit

Permalink
Attempt to fix warnings from VS2017 Win64 compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
Talon1024 committed Sep 22, 2018
1 parent 7d4895d commit 525ab8e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/r_data/models/models_obj.cpp
Expand Up @@ -379,9 +379,9 @@ void FOBJModel::BuildVertexBuffer(FModelRenderer *renderer)

FModelVertex *vertptr = vbuf->LockVertexBuffer(vbufsize);

for (size_t i = 0; i < surfaces.Size(); i++)
for (unsigned int i = 0; i < surfaces.Size(); i++)
{
for (size_t j = 0; j < surfaces[i].numTris; j++)
for (unsigned int j = 0; j < surfaces[i].numTris; j++)
{
for (size_t side = 0; side < 3; side++)
{
Expand Down Expand Up @@ -506,9 +506,9 @@ void FOBJModel::TriangulateQuad(const OBJFace &quad, OBJFace *tris)
void FOBJModel::AddVertFaces() {
// Initialize and populate vertFaces - this array stores references to triangles per vertex
vertFaces = new TArray<OBJTriRef>[verts.Size()];
for (size_t i = 0; i < surfaces.Size(); i++)
for (unsigned int i = 0; i < surfaces.Size(); i++)
{
for (size_t j = 0; j < surfaces[i].numTris; j++)
for (unsigned int j = 0; j < surfaces[i].numTris; j++)
{
OBJTriRef otr = OBJTriRef(i, j);
for (size_t k = 0; k < surfaces[i].tris[j].sideCount; k++)
Expand Down Expand Up @@ -599,7 +599,7 @@ FVector3 FOBJModel::CalculateNormalSmooth(unsigned int vidx, unsigned int smooth
vNormal += fNormal;
}
}
vNormal /= connectedFaces;
vNormal /= (float)connectedFaces;
return vNormal;
}

Expand Down

0 comments on commit 525ab8e

Please sign in to comment.