From e305098f0ca7830eb42c99e76561f5c6d0e670be Mon Sep 17 00:00:00 2001 From: Graham Pentheny Date: Sun, 29 Dec 2024 11:30:55 -0500 Subject: [PATCH] Removed unused local variable that was throwing a compiler warning numRemovedVerts is set but never used, and countPolyVerts does not have any side-effects, so this should be safe to remove. --- DetourTileCache/Source/DetourTileCacheBuilder.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/DetourTileCache/Source/DetourTileCacheBuilder.cpp b/DetourTileCache/Source/DetourTileCacheBuilder.cpp index dbc09eb48..334b36dd2 100644 --- a/DetourTileCache/Source/DetourTileCacheBuilder.cpp +++ b/DetourTileCache/Source/DetourTileCacheBuilder.cpp @@ -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;