Skip to content
Permalink
Browse files

Server/Misc: Do not pass a pointer to a nonpointer argument.

Signed-off-by: AriDEV <aridev666@gmail.com>
  • Loading branch information
AriDEV committed Feb 10, 2020
1 parent d564a72 commit 1e4911631914ad68d0a173e0eb20da6cdb4acce8
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/server/collision/Management/MMapManager.cpp
@@ -153,7 +153,7 @@ namespace MMAP
dtTileRef tileRef = 0;

// memory allocated for data is now managed by detour, and will be deallocated when the tile is removed
if (dtStatusSucceed(mmap->navMesh->addTile(data, fileHeader.size, NULL/*DT_TILE_FREE_DATA*/, 0, &tileRef)))
if (dtStatusSucceed(mmap->navMesh->addTile(data, fileHeader.size, 0/*DT_TILE_FREE_DATA*/, 0, &tileRef)))
{
mmap->loadedTileRefs.insert(std::pair<uint32, dtTileRef>(packedGridPos, tileRef));
++loadedTiles;
@@ -446,7 +446,7 @@ namespace MMAP
SF_LOG_DEBUG("phase", "MMapData::RemoveSwap: Unloaded phased %04u_%02i_%02i.mmtile from navmesh", swap, x, y);

// restore base tile
if (dtStatusSucceed(navMesh->addTile(_baseTiles[packedXY]->data, _baseTiles[packedXY]->dataSize, NULL, 0, &loadedTileRefs[packedXY])))
if (dtStatusSucceed(navMesh->addTile(_baseTiles[packedXY]->data, _baseTiles[packedXY]->dataSize, 0, 0, &loadedTileRefs[packedXY])))
{
SF_LOG_DEBUG("phase", "MMapData::RemoveSwap: Loaded base mmtile %04u[%02i, %02i] into %04i[%02i, %02i]", _mapId, x, y, _mapId, header->x, header->y);
}
@@ -514,7 +514,7 @@ namespace MMAP
loadedPhasedTiles[swap].insert(packedXY);

// add new swapped tile
if (dtStatusSucceed(navMesh->addTile(ptile->data, ptile->fileHeader.size, NULL, 0, &loadedTileRefs[packedXY])))
if (dtStatusSucceed(navMesh->addTile(ptile->data, ptile->fileHeader.size, 0, 0, &loadedTileRefs[packedXY])))
{
SF_LOG_DEBUG("phase", "MMapData::AddSwap: Loaded phased mmtile %04u[%02i, %02i] into %04i[%02i, %02i]", swap, x, y, _mapId, header->x, header->y);
}

0 comments on commit 1e49116

Please sign in to comment.
You can’t perform that action at this time.