Core: Pass by const reference for simple objects replaced with pass by value
This commit is contained in:
@@ -515,7 +515,7 @@ void Map::VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor<Trinity::Obj
|
||||
}
|
||||
}
|
||||
|
||||
void Map::Update(const uint32 &t_diff)
|
||||
void Map::Update(const uint32 t_diff)
|
||||
{
|
||||
/// update worldsessions for existing players
|
||||
for (m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter)
|
||||
@@ -593,7 +593,7 @@ struct ResetNotifier
|
||||
void Visit(PlayerMapType &m) { resetNotify<Player>(m);}
|
||||
};
|
||||
|
||||
void Map::ProcessRelocationNotifies(const uint32 & diff)
|
||||
void Map::ProcessRelocationNotifies(const uint32 diff)
|
||||
{
|
||||
for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end(); ++i)
|
||||
{
|
||||
@@ -929,7 +929,7 @@ bool Map::CreatureRespawnRelocation(Creature *c)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Map::UnloadGrid(const uint32 &x, const uint32 &y, bool unloadAll)
|
||||
bool Map::UnloadGrid(const uint32 x, const uint32 y, bool unloadAll)
|
||||
{
|
||||
NGridType *grid = getNGrid(x, y);
|
||||
ASSERT(grid != NULL);
|
||||
@@ -2388,7 +2388,7 @@ bool InstanceMap::Add(Player* player)
|
||||
return true;
|
||||
}
|
||||
|
||||
void InstanceMap::Update(const uint32& t_diff)
|
||||
void InstanceMap::Update(const uint32 t_diff)
|
||||
{
|
||||
Map::Update(t_diff);
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@ class Map : public GridRefManager<NGridType>
|
||||
template<class T> void Remove(T *, bool);
|
||||
|
||||
void VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor<Trinity::ObjectUpdater, GridTypeMapContainer> &gridVisitor, TypeContainerVisitor<Trinity::ObjectUpdater, WorldTypeMapContainer> &worldVisitor);
|
||||
virtual void Update(const uint32&);
|
||||
virtual void Update(const uint32);
|
||||
|
||||
float GetVisibilityRange() const { return m_VisibleDistance; }
|
||||
//function for setting up visibility distance for maps on per-type/per-Id basis
|
||||
@@ -286,7 +286,7 @@ class Map : public GridRefManager<NGridType>
|
||||
bool GetUnloadLock(const GridPair &p) const { return getNGrid(p.x_coord, p.y_coord)->getUnloadLock(); }
|
||||
void SetUnloadLock(const GridPair &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadExplicitLock(on); }
|
||||
void LoadGrid(float x, float y);
|
||||
bool UnloadGrid(const uint32 &x, const uint32 &y, bool pForce);
|
||||
bool UnloadGrid(const uint32 x, const uint32 y, bool pForce);
|
||||
virtual void UnloadAll();
|
||||
|
||||
void ResetGridExpiry(NGridType &grid, float factor = 1) const
|
||||
@@ -473,7 +473,7 @@ class Map : public GridRefManager<NGridType>
|
||||
void setNGrid(NGridType* grid, uint32 x, uint32 y);
|
||||
void ScriptsProcess();
|
||||
|
||||
void UpdateActiveCells(const float &x, const float &y, const uint32 &t_diff);
|
||||
void UpdateActiveCells(const float &x, const float &y, const uint32 t_diff);
|
||||
protected:
|
||||
void SetUnloadReferenceLock(const GridPair &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadReferenceLock(on); }
|
||||
|
||||
@@ -516,7 +516,7 @@ class Map : public GridRefManager<NGridType>
|
||||
|
||||
//these functions used to process player/mob aggro reactions and
|
||||
//visibility calculations. Highly optimized for massive calculations
|
||||
void ProcessRelocationNotifies(const uint32 &diff);
|
||||
void ProcessRelocationNotifies(const uint32 diff);
|
||||
|
||||
bool i_scriptLock;
|
||||
std::set<WorldObject *> i_objectsToRemove;
|
||||
@@ -577,7 +577,7 @@ class InstanceMap : public Map
|
||||
~InstanceMap();
|
||||
bool Add(Player *);
|
||||
void Remove(Player *, bool);
|
||||
void Update(const uint32&);
|
||||
void Update(const uint32);
|
||||
void CreateInstanceData(bool load);
|
||||
bool Reset(uint8 method);
|
||||
uint32 GetScriptId() { return i_script_id; }
|
||||
|
||||
@@ -44,7 +44,7 @@ void MapInstanced::InitVisibilityDistance()
|
||||
}
|
||||
}
|
||||
|
||||
void MapInstanced::Update(const uint32& t)
|
||||
void MapInstanced::Update(const uint32 t)
|
||||
{
|
||||
// take care of loaded GridMaps (when unused, unload it!)
|
||||
Map::Update(t);
|
||||
|
||||
@@ -33,7 +33,7 @@ class MapInstanced : public Map
|
||||
~MapInstanced() {}
|
||||
|
||||
// functions overwrite Map versions
|
||||
void Update(const uint32&);
|
||||
void Update(const uint32);
|
||||
void DelayedUpdate(const uint32 diff);
|
||||
//void RelocationNotify();
|
||||
void UnloadAll();
|
||||
|
||||
Reference in New Issue
Block a user