Fix possible compile/link error with multiple BuildContext definitions
There is a class and a struct called BuildContext in two different files, one .h and one .cpp. Depending on how the user structures their program, it's possible that this would cause a compile or link error, as seems to have happened in #44. I've just renamed the struct to get around this. Fixes #44
This commit is contained in:
parent
0143337a64
commit
f117bf4a91
@ -40,10 +40,10 @@ inline int computeTileHash(int x, int y, const int mask)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct BuildContext
|
struct NavMeshTileBuildContext
|
||||||
{
|
{
|
||||||
inline BuildContext(struct dtTileCacheAlloc* a) : layer(0), lcset(0), lmesh(0), alloc(a) {}
|
inline NavMeshTileBuildContext(struct dtTileCacheAlloc* a) : layer(0), lcset(0), lmesh(0), alloc(a) {}
|
||||||
inline ~BuildContext() { purge(); }
|
inline ~NavMeshTileBuildContext() { purge(); }
|
||||||
void purge()
|
void purge()
|
||||||
{
|
{
|
||||||
dtFreeTileCacheLayer(alloc, layer);
|
dtFreeTileCacheLayer(alloc, layer);
|
||||||
@ -587,7 +587,7 @@ dtStatus dtTileCache::buildNavMeshTile(const dtCompressedTileRef ref, dtNavMesh*
|
|||||||
|
|
||||||
m_talloc->reset();
|
m_talloc->reset();
|
||||||
|
|
||||||
BuildContext bc(m_talloc);
|
NavMeshTileBuildContext bc(m_talloc);
|
||||||
const int walkableClimbVx = (int)(m_params.walkableClimb / m_params.ch);
|
const int walkableClimbVx = (int)(m_params.walkableClimb / m_params.ch);
|
||||||
dtStatus status;
|
dtStatus status;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user