Remove unnecessary const_cast<Map*>.

This commit is contained in:
megamage
2011-11-23 12:51:20 -05:00
parent 98be413ce0
commit 5a0ffefecc
4 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -1599,7 +1599,7 @@ uint32 ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, float y, float
if (!goinfo)
return 0;
Map* map = const_cast<Map*>(sMapMgr->CreateBaseMap(mapId));
Map* map = sMapMgr->CreateBaseMap(mapId);
if (!map)
return 0;
@@ -1660,7 +1660,7 @@ bool ObjectMgr::MoveCreData(uint32 guid, uint32 mapId, Position pos)
AddCreatureToGrid(guid, &data);
// Spawn if necessary (loaded grids only)
if (Map* map = const_cast<Map*>(sMapMgr->CreateBaseMap(mapId)))
if (Map* map = sMapMgr->CreateBaseMap(mapId))
{
// We use spawn coords to spawn
if (!map->Instanceable() && map->IsGridLoaded(data.posX, data.posY))
@@ -1713,7 +1713,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float
AddCreatureToGrid(guid, &data);
// Spawn if necessary (loaded grids only)
if (Map* map = const_cast<Map*>(sMapMgr->CreateBaseMap(mapId)))
if (Map* map = sMapMgr->CreateBaseMap(mapId))
{
// We use spawn coords to spawn
if (!map->Instanceable() && !map->IsRemovalGrid(x, y))