Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Server/Misc: Do not pass a pointer to a nonpointer argument.
Browse files Browse the repository at this point in the history
Signed-off-by: AriDEV <aridev666@gmail.com>
  • Loading branch information
AriDEV committed Feb 10, 2020
1 parent d564a72 commit 1e49116
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/server/collision/Management/MMapManager.cpp
Expand Up @@ -153,7 +153,7 @@ namespace MMAP
dtTileRef tileRef = 0; dtTileRef tileRef = 0;


// memory allocated for data is now managed by detour, and will be deallocated when the tile is removed // 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)); mmap->loadedTileRefs.insert(std::pair<uint32, dtTileRef>(packedGridPos, tileRef));
++loadedTiles; ++loadedTiles;
Expand Down Expand Up @@ -446,7 +446,7 @@ namespace MMAP
SF_LOG_DEBUG("phase", "MMapData::RemoveSwap: Unloaded phased %04u_%02i_%02i.mmtile from navmesh", swap, x, y); SF_LOG_DEBUG("phase", "MMapData::RemoveSwap: Unloaded phased %04u_%02i_%02i.mmtile from navmesh", swap, x, y);


// restore base tile // 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); SF_LOG_DEBUG("phase", "MMapData::RemoveSwap: Loaded base mmtile %04u[%02i, %02i] into %04i[%02i, %02i]", _mapId, x, y, _mapId, header->x, header->y);
} }
Expand Down Expand Up @@ -514,7 +514,7 @@ namespace MMAP
loadedPhasedTiles[swap].insert(packedXY); loadedPhasedTiles[swap].insert(packedXY);


// add new swapped tile // 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); SF_LOG_DEBUG("phase", "MMapData::AddSwap: Loaded phased mmtile %04u[%02i, %02i] into %04i[%02i, %02i]", swap, x, y, _mapId, header->x, header->y);
} }
Expand Down

0 comments on commit 1e49116

Please sign in to comment.