From 0ccf9fbb6c22c1651242bb301f5c3087552a8a1c Mon Sep 17 00:00:00 2001 From: Kromster80 Date: Sun, 16 Nov 2014 21:32:29 +0300 Subject: [PATCH 1/4] Removed unnecessary assignment --- Detour/Source/DetourNavMesh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Detour/Source/DetourNavMesh.cpp b/Detour/Source/DetourNavMesh.cpp index 9d627be..d353d08 100644 --- a/Detour/Source/DetourNavMesh.cpp +++ b/Detour/Source/DetourNavMesh.cpp @@ -717,7 +717,7 @@ dtPolyRef dtNavMesh::findNearestPolyInTile(const dtMeshTile* tile, float closestPtPoly[3]; float diff[3]; bool posOverPoly = false; - float d = 0; + float d; closestPointOnPoly(ref, center, closestPtPoly, &posOverPoly); // If a point is directly over a polygon and closer than From 96ff08a255f11c0ee44cb0f04bff7a785bf6bee2 Mon Sep 17 00:00:00 2001 From: Kromster80 Date: Thu, 27 Nov 2014 22:41:28 +0300 Subject: [PATCH 2/4] Removed unnecessary assignments --- RecastDemo/Source/NavMeshTesterTool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RecastDemo/Source/NavMeshTesterTool.cpp b/RecastDemo/Source/NavMeshTesterTool.cpp index 5bb363d..1e6f5b0 100644 --- a/RecastDemo/Source/NavMeshTesterTool.cpp +++ b/RecastDemo/Source/NavMeshTesterTool.cpp @@ -1143,7 +1143,7 @@ void NavMeshTesterTool::handleRender() dd.begin(DU_DRAW_LINES, 2.0f); for (int i = 0; i < m_nstraightPath-1; ++i) { - unsigned int col = 0; + unsigned int col; if (m_straightPathFlags[i] & DT_STRAIGHTPATH_OFFMESH_CONNECTION) col = offMeshCol; else @@ -1156,7 +1156,7 @@ void NavMeshTesterTool::handleRender() dd.begin(DU_DRAW_POINTS, 6.0f); for (int i = 0; i < m_nstraightPath; ++i) { - unsigned int col = 0; + unsigned int col; if (m_straightPathFlags[i] & DT_STRAIGHTPATH_START) col = startCol; else if (m_straightPathFlags[i] & DT_STRAIGHTPATH_START) From 6799d49b1a31e1f90b360672dfd66560c08e92bd Mon Sep 17 00:00:00 2001 From: Kromster80 Date: Sun, 7 Dec 2014 14:11:46 +0300 Subject: [PATCH 3/4] Extra verbosity for var init --- DetourCrowd/Source/DetourObstacleAvoidance.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DetourCrowd/Source/DetourObstacleAvoidance.cpp b/DetourCrowd/Source/DetourObstacleAvoidance.cpp index c3676c3..1b7207d 100644 --- a/DetourCrowd/Source/DetourObstacleAvoidance.cpp +++ b/DetourCrowd/Source/DetourObstacleAvoidance.cpp @@ -281,7 +281,7 @@ void dtObstacleAvoidanceQuery::prepare(const float* pos, const float* dvel) const float* pa = pos; const float* pb = cir->p; - const float orig[3] = {0,0}; + const float orig[3] = {0,0,0}; float dv[3]; dtVsub(cir->dp,pb,pa); dtVnormalize(cir->dp); @@ -614,4 +614,4 @@ int dtObstacleAvoidanceQuery::sampleVelocityAdaptive(const float* pos, const flo dtVcopy(nvel, res); return ns; -} \ No newline at end of file +} From a94ecdc079cbfe4ed9fcd6945eb12d53ed35a670 Mon Sep 17 00:00:00 2001 From: Kromster80 Date: Sat, 13 Dec 2014 10:55:04 +0300 Subject: [PATCH 4/4] Removed unneeded assignment --- Recast/Source/RecastRasterization.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Recast/Source/RecastRasterization.cpp b/Recast/Source/RecastRasterization.cpp index 45a7d35..c3bda80 100644 --- a/Recast/Source/RecastRasterization.cpp +++ b/Recast/Source/RecastRasterization.cpp @@ -50,7 +50,7 @@ static rcSpan* allocSpan(rcHeightfield& hf) // Allocate memory for the new pool. rcSpanPool* pool = (rcSpanPool*)rcAlloc(sizeof(rcSpanPool), RC_ALLOC_PERM); if (!pool) return 0; - pool->next = 0; + // Add the pool into the list of pools. pool->next = hf.pools; hf.pools = pool;