From e30a6635a28184b523be370eb052ef7ba500abf6 Mon Sep 17 00:00:00 2001 From: Jakob Botsch Nielsen Date: Mon, 15 Feb 2016 23:06:43 +0100 Subject: [PATCH] Fix warnings and increase demo text pool size Fix three warnings added in fc5df2c, and increase the text pool size in the demo. This would frequently be overflowed, even just by building with the default settings and expanding the log. --- Detour/Source/DetourNavMeshQuery.cpp | 5 +++++ RecastDemo/Source/imgui.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Detour/Source/DetourNavMeshQuery.cpp b/Detour/Source/DetourNavMeshQuery.cpp index c1f57df..9db64d0 100644 --- a/Detour/Source/DetourNavMeshQuery.cpp +++ b/Detour/Source/DetourNavMeshQuery.cpp @@ -716,6 +716,8 @@ public: void process(const dtMeshTile* tile, dtPoly** polys, dtPolyRef* refs, int count) { + dtIgnoreUnused(polys); + for (int i = 0; i < count; ++i) { dtPolyRef ref = refs[i]; @@ -914,6 +916,9 @@ public: void process(const dtMeshTile* tile, dtPoly** polys, dtPolyRef* refs, int count) { + dtIgnoreUnused(tile); + dtIgnoreUnused(polys); + int numLeft = m_maxPolys - m_numCollected; int toCopy = count; if (toCopy > numLeft) diff --git a/RecastDemo/Source/imgui.cpp b/RecastDemo/Source/imgui.cpp index 17430a7..89fcc19 100644 --- a/RecastDemo/Source/imgui.cpp +++ b/RecastDemo/Source/imgui.cpp @@ -28,7 +28,7 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -static const unsigned TEXT_POOL_SIZE = 8000; +static const unsigned TEXT_POOL_SIZE = 50000; static char g_textPool[TEXT_POOL_SIZE]; static unsigned g_textPoolSize = 0; static const char* allocText(const char* text)