diff --git a/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp b/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp index 78662d59..8bc16e56 100644 --- a/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp +++ b/src/thirdparty/recast/Detour/Source/DetourNavMesh.cpp @@ -715,7 +715,7 @@ dtStatus dtNavMesh::connectOffMeshLinks(const dtTileRef tileRef) const int nneis = getTilesAt(tx, ty, neis, MAX_NEIS); const unsigned char side = rdClassifyPointOutsideBounds(&con->pos[3], header->bmin, header->bmax); - const unsigned char oppositeSide = (side == 0xff) ? 0xff : (unsigned char)rdOppositeTile(side); + const unsigned char oppositeSide = (side == 0xff) ? 0xff : rdOppositeTile(side); for (int j = 0; j < nneis; ++j) { diff --git a/src/thirdparty/recast/Shared/Include/SharedCommon.h b/src/thirdparty/recast/Shared/Include/SharedCommon.h index 166babbb..70b01878 100644 --- a/src/thirdparty/recast/Shared/Include/SharedCommon.h +++ b/src/thirdparty/recast/Shared/Include/SharedCommon.h @@ -617,8 +617,8 @@ inline unsigned int rdIlog2(unsigned int v) inline int rdAlign4(int x) { return (x+3) & ~3; } -inline int rdWrapTileSide(int side) { return side & 0x7; } -inline int rdOppositeTile(int side) { return rdWrapTileSide(side+4); } +inline unsigned char rdWrapTileSide(const int side) { return side & 0x7; } +inline unsigned char rdOppositeTile(const int side) { return rdWrapTileSide(side+4); } inline void rdSwapByte(unsigned char* a, unsigned char* b) {