From 807a327b6f6af63d681506e590e6656dc2448180 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Tue, 3 Sep 2024 01:52:22 +0200 Subject: [PATCH] Recast: fix compiler warnings caused by unused local variables --- src/naveditor/Editor_Common.cpp | 2 -- src/naveditor/NavMeshPruneTool.cpp | 3 --- src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp | 2 -- 3 files changed, 7 deletions(-) diff --git a/src/naveditor/Editor_Common.cpp b/src/naveditor/Editor_Common.cpp index 5b2c5de6..7409735f 100644 --- a/src/naveditor/Editor_Common.cpp +++ b/src/naveditor/Editor_Common.cpp @@ -171,8 +171,6 @@ void Editor_StaticTileMeshCommon::renderRecastDebugMenu() const bool hasSolid = m_solid != 0; const bool hasDMesh = m_dmesh != 0; - const bool intermediateDataUnavailable = !hasChf || !hasCset || !hasSolid || !hasDMesh; - isEnabled = getTileMeshDrawFlags() & TM_DRAWFLAGS_NAVMESH; //ImGui::BeginDisabled(!hasNavMesh); diff --git a/src/naveditor/NavMeshPruneTool.cpp b/src/naveditor/NavMeshPruneTool.cpp index 2df545c6..4bbc6b4c 100644 --- a/src/naveditor/NavMeshPruneTool.cpp +++ b/src/naveditor/NavMeshPruneTool.cpp @@ -205,10 +205,7 @@ static void removeUnlinkedTiles(dtNavMesh* nav) if (!header) continue; if (header->userId == DT_FULL_UNLINKED_TILE_USER_ID) - { - const int polyCount = header->polyCount; nav->removeTile(nav->getTileRef(tile), 0, 0); - } }; } diff --git a/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp b/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp index f2632bbc..75bd742d 100644 --- a/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp +++ b/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp @@ -631,8 +631,6 @@ dtStatus dtNavMesh::connectExtOffMeshLinks(const dtTileRef tileRef) if (!landPolyRef) continue; - const bool sameTile = tile == neiTile; - // Link off-mesh connection to target poly. if (!connectOffMeshLink(tile, conPoly, landPolyRef, oppositeSide, 1, DT_NULL_TRAVERSE_TYPE, 0)) return DT_FAILURE | DT_OUT_OF_MEMORY;