From dc7e248de6e0da2a3a533977081c461137a75b4d Mon Sep 17 00:00:00 2001 From: grahamboree Date: Tue, 15 Oct 2013 17:29:14 -0400 Subject: [PATCH] Removed header dependency between Detour and Recast due to addition of rcIgnoreUnused. Added dtIgnoreUnused. --- Detour/Include/DetourCommon.h | 5 +++++ DetourTileCache/Source/DetourTileCacheBuilder.cpp | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Detour/Include/DetourCommon.h b/Detour/Include/DetourCommon.h index ed7c514..0888614 100644 --- a/Detour/Include/DetourCommon.h +++ b/Detour/Include/DetourCommon.h @@ -32,6 +32,11 @@ feature to find minor members. /// @name General helper functions /// @{ +/// Used to ignore a function parameter. VS complains about unused parameters +/// and this silences the warning. +/// @param [in] _ Unused parameter +template void dtIgnoreUnused(const T&) { } + /// Swaps the values of the two parameters. /// @param[in,out] a Value A /// @param[in,out] b Value B diff --git a/DetourTileCache/Source/DetourTileCacheBuilder.cpp b/DetourTileCache/Source/DetourTileCacheBuilder.cpp index 18a26d0..d6602b7 100644 --- a/DetourTileCache/Source/DetourTileCacheBuilder.cpp +++ b/DetourTileCache/Source/DetourTileCacheBuilder.cpp @@ -21,7 +21,6 @@ #include "DetourStatus.h" #include "DetourAssert.h" #include "DetourTileCacheBuilder.h" -#include "Recast.h" #include @@ -2117,7 +2116,7 @@ dtStatus dtDecompressTileCacheLayer(dtTileCacheAlloc* alloc, dtTileCacheCompress bool dtTileCacheHeaderSwapEndian(unsigned char* data, const int dataSize) { - rcIgnoreUnused(dataSize); + dtIgnoreUnused(dataSize); dtTileCacheLayerHeader* header = (dtTileCacheLayerHeader*)data; int swappedMagic = DT_TILECACHE_MAGIC;