mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[6884] Replaced iterator++ with ++iterator in for-loop-headers
i used this script
for i in ls *.[ch]*; do cat $i | sed -r 's/(.*for.*iterator.*;\
*)([a-z0-9\_\*]+)\ *\+\+(.*)/\1++\2\3/' > /tmp/mangos/$i; done
for i in ls *.[ch]*; do cp /tmp/mangos/$i $i; done
and rechecked it with my eyes, if everything is right
i took only for-loops cause they can be gathered easier with a script
Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
parent
66c98859cf
commit
2e08a63da7
14 changed files with 40 additions and 40 deletions
|
|
@ -192,7 +192,7 @@ Group * ObjectMgr::GetGroupByLeader(const uint64 &guid) const
|
|||
|
||||
Guild * ObjectMgr::GetGuildById(const uint32 GuildId) const
|
||||
{
|
||||
for(GuildSet::const_iterator itr = mGuildSet.begin(); itr != mGuildSet.end(); itr++)
|
||||
for(GuildSet::const_iterator itr = mGuildSet.begin(); itr != mGuildSet.end(); ++itr)
|
||||
if ((*itr)->GetId() == GuildId)
|
||||
return *itr;
|
||||
|
||||
|
|
@ -201,7 +201,7 @@ Guild * ObjectMgr::GetGuildById(const uint32 GuildId) const
|
|||
|
||||
Guild * ObjectMgr::GetGuildByName(std::string guildname) const
|
||||
{
|
||||
for(GuildSet::const_iterator itr = mGuildSet.begin(); itr != mGuildSet.end(); itr++)
|
||||
for(GuildSet::const_iterator itr = mGuildSet.begin(); itr != mGuildSet.end(); ++itr)
|
||||
if ((*itr)->GetName() == guildname)
|
||||
return *itr;
|
||||
|
||||
|
|
@ -210,7 +210,7 @@ Guild * ObjectMgr::GetGuildByName(std::string guildname) const
|
|||
|
||||
std::string ObjectMgr::GetGuildNameById(const uint32 GuildId) const
|
||||
{
|
||||
for(GuildSet::const_iterator itr = mGuildSet.begin(); itr != mGuildSet.end(); itr++)
|
||||
for(GuildSet::const_iterator itr = mGuildSet.begin(); itr != mGuildSet.end(); ++itr)
|
||||
if ((*itr)->GetId() == GuildId)
|
||||
return (*itr)->GetName();
|
||||
|
||||
|
|
@ -228,7 +228,7 @@ Guild* ObjectMgr::GetGuildByLeader(const uint64 &guid) const
|
|||
|
||||
ArenaTeam* ObjectMgr::GetArenaTeamById(const uint32 ArenaTeamId) const
|
||||
{
|
||||
for(ArenaTeamSet::const_iterator itr = mArenaTeamSet.begin(); itr != mArenaTeamSet.end(); itr++)
|
||||
for(ArenaTeamSet::const_iterator itr = mArenaTeamSet.begin(); itr != mArenaTeamSet.end(); ++itr)
|
||||
if ((*itr)->GetId() == ArenaTeamId)
|
||||
return *itr;
|
||||
|
||||
|
|
@ -237,7 +237,7 @@ ArenaTeam* ObjectMgr::GetArenaTeamById(const uint32 ArenaTeamId) const
|
|||
|
||||
ArenaTeam* ObjectMgr::GetArenaTeamByName(std::string arenateamname) const
|
||||
{
|
||||
for(ArenaTeamSet::const_iterator itr = mArenaTeamSet.begin(); itr != mArenaTeamSet.end(); itr++)
|
||||
for(ArenaTeamSet::const_iterator itr = mArenaTeamSet.begin(); itr != mArenaTeamSet.end(); ++itr)
|
||||
if ((*itr)->GetName() == arenateamname)
|
||||
return *itr;
|
||||
|
||||
|
|
@ -246,7 +246,7 @@ ArenaTeam* ObjectMgr::GetArenaTeamByName(std::string arenateamname) const
|
|||
|
||||
ArenaTeam* ObjectMgr::GetArenaTeamByCapitan(uint64 const& guid) const
|
||||
{
|
||||
for(ArenaTeamSet::const_iterator itr = mArenaTeamSet.begin(); itr != mArenaTeamSet.end(); itr++)
|
||||
for(ArenaTeamSet::const_iterator itr = mArenaTeamSet.begin(); itr != mArenaTeamSet.end(); ++itr)
|
||||
if ((*itr)->GetCaptain() == guid)
|
||||
return *itr;
|
||||
|
||||
|
|
@ -2862,7 +2862,7 @@ void ObjectMgr::LoadQuests()
|
|||
delete result;
|
||||
|
||||
// Post processing
|
||||
for (QuestMap::iterator iter = mQuestTemplates.begin(); iter != mQuestTemplates.end(); iter++)
|
||||
for (QuestMap::iterator iter = mQuestTemplates.begin(); iter != mQuestTemplates.end(); ++iter)
|
||||
{
|
||||
Quest * qinfo = iter->second;
|
||||
|
||||
|
|
@ -4081,7 +4081,7 @@ void ObjectMgr::LoadPageTexts()
|
|||
{
|
||||
std::ostringstream ss;
|
||||
ss<< "The text page(s) ";
|
||||
for (std::set<uint32>::iterator itr= checkedPages.begin();itr!=checkedPages.end(); itr++)
|
||||
for (std::set<uint32>::iterator itr= checkedPages.begin();itr!=checkedPages.end(); ++itr)
|
||||
ss << *itr << " ";
|
||||
ss << "create(s) a circular reference, which can cause the server to freeze. Changing Next_Page of page "
|
||||
<< pageItr->Page_ID <<" to 0";
|
||||
|
|
@ -5065,7 +5065,7 @@ AreaTrigger const* ObjectMgr::GetGoBackTrigger(uint32 Map) const
|
|||
{
|
||||
const MapEntry *mapEntry = sMapStore.LookupEntry(Map);
|
||||
if(!mapEntry) return NULL;
|
||||
for (AreaTriggerMap::const_iterator itr = mAreaTriggers.begin(); itr != mAreaTriggers.end(); itr++)
|
||||
for (AreaTriggerMap::const_iterator itr = mAreaTriggers.begin(); itr != mAreaTriggers.end(); ++itr)
|
||||
{
|
||||
if(itr->second.target_mapId == mapEntry->entrance_map)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue