Skip to content

Commit

Permalink
[10612] Revert "[10611] Made some values const"
Browse files Browse the repository at this point in the history
Reason: It makes no sense to make a local variable const.

This reverts commit 49e3184.
  • Loading branch information
DasBlub committed Oct 15, 2010
1 parent 49e3184 commit 7e0e727
Show file tree
Hide file tree
Showing 59 changed files with 64 additions and 64 deletions.
2 changes: 1 addition & 1 deletion src/game/BattleGround.cpp
Expand Up @@ -310,7 +310,7 @@ BattleGround::~BattleGround()
delete itr->second;
}

void BattleGround::Update(const uint32 diff)
void BattleGround::Update(uint32 diff)
{
if (!GetPlayersSize())
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGround.h
Expand Up @@ -292,7 +292,7 @@ class BattleGround
BattleGround();
/*BattleGround(const BattleGround& bg);*/
virtual ~BattleGround();
virtual void Update(const uint32 diff); // must be implemented in BG subclass of BG specific update code, but must in begginning call parent version
virtual void Update(uint32 diff); // must be implemented in BG subclass of BG specific update code, but must in begginning call parent version
virtual bool SetupBattleGround() // must be implemented in BG subclass
{
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundAA.cpp
Expand Up @@ -40,7 +40,7 @@ BattleGroundAA::~BattleGroundAA()

}

void BattleGroundAA::Update(const uint32 diff)
void BattleGroundAA::Update(uint32 diff)
{
BattleGround::Update(diff);
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundAA.h
Expand Up @@ -35,7 +35,7 @@ class BattleGroundAA : public BattleGround
public:
BattleGroundAA();
~BattleGroundAA();
void Update(const uint32 diff);
void Update(uint32 diff);

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundAB.cpp
Expand Up @@ -43,7 +43,7 @@ BattleGroundAB::~BattleGroundAB()
{
}

void BattleGroundAB::Update(const uint32 diff)
void BattleGroundAB::Update(uint32 diff)
{
BattleGround::Update(diff);

Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundAB.h
Expand Up @@ -180,7 +180,7 @@ class BattleGroundAB : public BattleGround
BattleGroundAB();
~BattleGroundAB();

void Update(const uint32 diff);
void Update(uint32 diff);
void AddPlayer(Player *plr);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundAV.cpp
Expand Up @@ -232,7 +232,7 @@ void BattleGroundAV::UpdateScore(BattleGroundTeamId team, int32 points )
UpdateWorldState(((team == BG_TEAM_HORDE) ? BG_AV_Horde_Score : BG_AV_Alliance_Score), m_TeamScores[team]);
}

void BattleGroundAV::Update(const uint32 diff)
void BattleGroundAV::Update(uint32 diff)
{
BattleGround::Update(diff);
if (GetStatus() != STATUS_IN_PROGRESS)
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundAV.h
Expand Up @@ -305,7 +305,7 @@ class BattleGroundAV : public BattleGround
public:
BattleGroundAV();
~BattleGroundAV();
void Update(const uint32 diff);
void Update(uint32 diff);

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundBE.cpp
Expand Up @@ -42,7 +42,7 @@ BattleGroundBE::~BattleGroundBE()

}

void BattleGroundBE::Update(const uint32 diff)
void BattleGroundBE::Update(uint32 diff)
{
BattleGround::Update(diff);

Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundBE.h
Expand Up @@ -34,7 +34,7 @@ class BattleGroundBE : public BattleGround
public:
BattleGroundBE();
~BattleGroundBE();
void Update(const uint32 diff);
void Update(uint32 diff);

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundDS.cpp
Expand Up @@ -40,7 +40,7 @@ BattleGroundDS::~BattleGroundDS()

}

void BattleGroundDS::Update(const uint32 diff)
void BattleGroundDS::Update(uint32 diff)
{
BattleGround::Update(diff);
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundDS.h
Expand Up @@ -35,7 +35,7 @@ class BattleGroundDS : public BattleGround
public:
BattleGroundDS();
~BattleGroundDS();
void Update(const uint32 diff);
void Update(uint32 diff);

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundEY.cpp
Expand Up @@ -48,7 +48,7 @@ BattleGroundEY::~BattleGroundEY()
{
}

void BattleGroundEY::Update(const uint32 diff)
void BattleGroundEY::Update(uint32 diff)
{
BattleGround::Update(diff);

Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundEY.h
Expand Up @@ -246,7 +246,7 @@ class BattleGroundEY : public BattleGround
public:
BattleGroundEY();
~BattleGroundEY();
void Update(const uint32 diff);
void Update(uint32 diff);

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundIC.cpp
Expand Up @@ -35,7 +35,7 @@ BattleGroundIC::~BattleGroundIC()

}

void BattleGroundIC::Update(const uint32 diff)
void BattleGroundIC::Update(uint32 diff)
{
BattleGround::Update(diff);
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundIC.h
Expand Up @@ -35,7 +35,7 @@ class BattleGroundIC : public BattleGround
public:
BattleGroundIC();
~BattleGroundIC();
void Update(const uint32 diff);
void Update(uint32 diff);

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundMgr.cpp
Expand Up @@ -1151,7 +1151,7 @@ void BattleGroundMgr::DeleteAllBattleGrounds()
}

// used to update running battlegrounds, and delete finished ones
void BattleGroundMgr::Update(const uint32 diff)
void BattleGroundMgr::Update(uint32 diff)
{
// update scheduled queues
if (!m_QueueUpdateScheduler.empty())
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundMgr.h
Expand Up @@ -187,7 +187,7 @@ class BattleGroundMgr
/* Construction */
BattleGroundMgr();
~BattleGroundMgr();
void Update(const uint32 diff);
void Update(uint32 diff);

/* Packet Building */
void BuildPlayerJoinedBattleGroundPacket(WorldPacket *data, Player *plr);
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundNA.cpp
Expand Up @@ -42,7 +42,7 @@ BattleGroundNA::~BattleGroundNA()

}

void BattleGroundNA::Update(const uint32 diff)
void BattleGroundNA::Update(uint32 diff)
{
BattleGround::Update(diff);

Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundNA.h
Expand Up @@ -35,7 +35,7 @@ class BattleGroundNA : public BattleGround
public:
BattleGroundNA();
~BattleGroundNA();
void Update(const uint32 diff);
void Update(uint32 diff);

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundRB.cpp
Expand Up @@ -35,7 +35,7 @@ BattleGroundRB::~BattleGroundRB()

}

void BattleGroundRB::Update(const uint32 diff)
void BattleGroundRB::Update(uint32 diff)
{
BattleGround::Update(diff);
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundRB.h
Expand Up @@ -35,7 +35,7 @@ class BattleGroundRB : public BattleGround
public:
BattleGroundRB();
~BattleGroundRB();
void Update(const uint32 diff);
void Update(uint32 diff);

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundRL.cpp
Expand Up @@ -42,7 +42,7 @@ BattleGroundRL::~BattleGroundRL()

}

void BattleGroundRL::Update(const uint32 diff)
void BattleGroundRL::Update(uint32 diff)
{
BattleGround::Update(diff);

Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundRL.h
Expand Up @@ -35,7 +35,7 @@ class BattleGroundRL : public BattleGround
public:
BattleGroundRL();
~BattleGroundRL();
void Update(const uint32 diff);
void Update(uint32 diff);

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundRV.cpp
Expand Up @@ -40,7 +40,7 @@ BattleGroundRV::~BattleGroundRV()

}

void BattleGroundRV::Update(const uint32 diff)
void BattleGroundRV::Update(uint32 diff)
{
BattleGround::Update(diff);
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundRV.h
Expand Up @@ -35,7 +35,7 @@ class BattleGroundRV : public BattleGround
public:
BattleGroundRV();
~BattleGroundRV();
void Update(const uint32 diff);
void Update(uint32 diff);

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundSA.cpp
Expand Up @@ -35,7 +35,7 @@ BattleGroundSA::~BattleGroundSA()

}

void BattleGroundSA::Update(const uint32 diff)
void BattleGroundSA::Update(uint32 diff)
{
BattleGround::Update(diff);
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundSA.h
Expand Up @@ -35,7 +35,7 @@ class BattleGroundSA : public BattleGround
public:
BattleGroundSA();
~BattleGroundSA();
void Update(const uint32 diff);
void Update(uint32 diff);

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundWS.cpp
Expand Up @@ -40,7 +40,7 @@ BattleGroundWS::~BattleGroundWS()
{
}

void BattleGroundWS::Update(const uint32 diff)
void BattleGroundWS::Update(uint32 diff)
{
BattleGround::Update(diff);

Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGroundWS.h
Expand Up @@ -101,7 +101,7 @@ class BattleGroundWS : public BattleGround
/* Construction */
BattleGroundWS();
~BattleGroundWS();
void Update(const uint32 diff);
void Update(uint32 diff);

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
Expand Down
2 changes: 1 addition & 1 deletion src/game/Creature.cpp
Expand Up @@ -404,7 +404,7 @@ uint32 Creature::ChooseDisplayId(const CreatureInfo *cinfo, const CreatureData *
return display_id;
}

void Creature::Update(const uint32 diff)
void Creature::Update(uint32 diff)
{
if (m_needNotify)
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/Creature.h
Expand Up @@ -401,7 +401,7 @@ class MANGOS_DLL_SPEC Creature : public Unit
uint32 GetDBTableGUIDLow() const { return m_DBTableGuid; }
char const* GetSubName() const { return GetCreatureInfo()->SubName; }

void Update(const uint32 time); // overwrite Unit::Update
void Update(uint32 time); // overwrite Unit::Update
void GetRespawnCoord(float &x, float &y, float &z, float* ori = NULL, float* dist =NULL) const;
uint32 GetEquipmentId() const { return m_equipmentId; }

Expand Down
6 changes: 3 additions & 3 deletions src/game/DynamicObject.cpp
Expand Up @@ -106,7 +106,7 @@ Unit* DynamicObject::GetCaster() const
return ObjectAccessor::GetUnit(*this, GetCasterGUID());
}

void DynamicObject::Update(const uint32 p_time)
void DynamicObject::Update(uint32 p_time)
{
// caster can be not in world at time dynamic object update, but dynamic object not yet deleted in Unit destructor
Unit* caster = GetCaster();
Expand Down Expand Up @@ -168,7 +168,7 @@ void DynamicObject::Delay(int32 delaytime)
break;
}
}

if (foundAura)
{
++iter;
Expand Down Expand Up @@ -210,4 +210,4 @@ bool DynamicObject::IsFriendlyTo( Unit const* unit ) const
return owner->IsFriendlyTo(unit);
else
return true;
}
}
2 changes: 1 addition & 1 deletion src/game/DynamicObject.h
Expand Up @@ -35,7 +35,7 @@ class DynamicObject : public WorldObject
void RemoveFromWorld();

bool Create(uint32 guidlow, Unit *caster, uint32 spellId, SpellEffectIndex effIndex, float x, float y, float z, int32 duration, float radius);
void Update(const uint32 p_time);
void Update(uint32 p_time);
void Delete();
uint32 GetSpellId() const { return m_spellId; }
SpellEffectIndex GetEffIndex() const { return m_effIndex; }
Expand Down
6 changes: 3 additions & 3 deletions src/game/GameObject.cpp
Expand Up @@ -159,7 +159,7 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa
return true;
}

void GameObject::Update(const uint32 /*p_time*/)
void GameObject::Update(uint32 /*p_time*/)
{
if (GetObjectGuid().IsMOTransport())
{
Expand Down Expand Up @@ -454,7 +454,7 @@ void GameObject::AddUniqueUse(Player* player)
m_firstUser = player->GetObjectGuid();

m_UniqueUsers.insert(player->GetObjectGuid());

}

void GameObject::Delete()
Expand Down Expand Up @@ -1636,4 +1636,4 @@ bool GameObject::IsInSkillupList(Player* player) const
void GameObject::AddToSkillupList(Player* player)
{
m_SkillupSet.insert(player->GetObjectGuid());
}
}
2 changes: 1 addition & 1 deletion src/game/GameObject.h
Expand Up @@ -588,7 +588,7 @@ class MANGOS_DLL_SPEC GameObject : public WorldObject
void RemoveFromWorld();

bool Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint8 animprogress, GOState go_state);
void Update(const uint32 p_time);
void Update(uint32 p_time);
GameObjectInfo const* GetGOInfo() const;

bool IsTransport() const;
Expand Down
2 changes: 1 addition & 1 deletion src/game/InstanceData.h
Expand Up @@ -48,7 +48,7 @@ class MANGOS_DLL_SPEC InstanceData
void SaveToDB();

//Called every map update
virtual void Update(const uint32 /*diff*/) {}
virtual void Update(uint32 /*diff*/) {}

//Used by the map's CanEnter function.
//This is to prevent players from entering during boss encounters.
Expand Down
2 changes: 1 addition & 1 deletion src/game/MapManager.cpp
Expand Up @@ -240,7 +240,7 @@ void MapManager::DeleteInstance(uint32 mapid, uint32 instanceId)
}

void
MapManager::Update(const uint32 diff)
MapManager::Update(uint32 diff)
{
i_timer.Update(diff);
if( !i_timer.Passed() )
Expand Down
2 changes: 1 addition & 1 deletion src/game/MapManager.h
Expand Up @@ -67,7 +67,7 @@ class MANGOS_DLL_DECL MapManager : public MaNGOS::Singleton<MapManager, MaNGOS::
}

void Initialize(void);
void Update(const uint32);
void Update(uint32);

void SetGridCleanUpDelay(uint32 t)
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/MotionMaster.cpp
Expand Up @@ -63,7 +63,7 @@ MotionMaster::~MotionMaster()
DirectClean(false,true);
}

void MotionMaster::UpdateMotion(const uint32 diff)
void MotionMaster::UpdateMotion(uint32 diff)
{
if (m_owner->hasUnitState(UNIT_STAT_CAN_NOT_MOVE))
return;
Expand Down

0 comments on commit 7e0e727

Please sign in to comment.