Skip to content

Commit

Permalink
Removed unused local variable that was throwing a compiler warning
Browse files Browse the repository at this point in the history
numRemovedVerts is set but never used, and countPolyVerts does not have any side-effects, so this should be safe to remove.
  • Loading branch information
grahamboree committed Dec 29, 2024
1 parent d8bbe14 commit e305098
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions DetourTileCache/Source/DetourTileCacheBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1504,19 +1504,6 @@ static bool canRemoveVertex(dtTileCachePolyMesh& mesh, const unsigned short rem)

static dtStatus removeVertex(dtTileCachePolyMesh& mesh, const unsigned short rem, const int maxTris)
{
// Count number of polygons to remove.
int numRemovedVerts = 0;
for (int i = 0; i < mesh.npolys; ++i)
{
unsigned short* p = &mesh.polys[i*MAX_VERTS_PER_POLY*2];
const int nv = countPolyVerts(p);
for (int j = 0; j < nv; ++j)
{
if (p[j] == rem)
numRemovedVerts++;
}
}

int nedges = 0;
unsigned short edges[MAX_REM_EDGES*3];
int nhole = 0;
Expand Down

0 comments on commit e305098

Please sign in to comment.