summaryrefslogtreecommitdiff
path: root/src/gui/whoisonline.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-01-20 19:01:23 +0300
committerAndrei Karas <akaras@inbox.ru>2013-01-20 19:29:26 +0300
commit531433248fbad49e2b8e9d90de9855f3ea9b2257 (patch)
tree33937a65d8b18934879824fa4c2a6183d53d5e73 /src/gui/whoisonline.cpp
parent48071e171de41a23197c7328ba038331a936e0eb (diff)
downloadmv-531433248fbad49e2b8e9d90de9855f3ea9b2257.tar.gz
mv-531433248fbad49e2b8e9d90de9855f3ea9b2257.tar.bz2
mv-531433248fbad49e2b8e9d90de9855f3ea9b2257.tar.xz
mv-531433248fbad49e2b8e9d90de9855f3ea9b2257.zip
Another part with FOR_EACH changes.
Diffstat (limited to 'src/gui/whoisonline.cpp')
-rw-r--r--src/gui/whoisonline.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp
index f0b0ab538..d7d67fbc2 100644
--- a/src/gui/whoisonline.cpp
+++ b/src/gui/whoisonline.cpp
@@ -139,11 +139,8 @@ WhoIsOnline::~WhoIsOnline()
// Remove possibly leftover temporary download
delete []mCurlError;
- for (std::set<OnlinePlayer*>::iterator itd = mOnlinePlayers.begin(),
- itd_end = mOnlinePlayers.end(); itd != itd_end; ++ itd)
- {
+ FOR_EACH (std::set<OnlinePlayer*>::iterator, itd, mOnlinePlayers)
delete *itd;
- }
mOnlinePlayers.clear();
mOnlineNicks.clear();
}
@@ -247,18 +244,14 @@ void WhoIsOnline::loadList(std::vector<OnlinePlayer*> &list)
std::vector<OnlinePlayer*> disregard;
std::vector<OnlinePlayer*> enemy;
- for (std::set<OnlinePlayer*>::iterator itd = mOnlinePlayers.begin(),
- itd_end = mOnlinePlayers.end(); itd != itd_end; ++ itd)
- {
+ FOR_EACH (std::set<OnlinePlayer*>::iterator, itd, mOnlinePlayers)
delete *itd;
- }
mOnlinePlayers.clear();
mOnlineNicks.clear();
mShowLevel = config.getBoolValue("showlevel");
- for (std::vector<OnlinePlayer*>::const_iterator it = list.begin(),
- it_end = list.end(); it != it_end; ++ it)
+ FOR_EACH (std::vector<OnlinePlayer*>::const_iterator, it, list)
{
OnlinePlayer *player = *it;
std::string nick = player->getNick();
@@ -335,11 +328,8 @@ void WhoIsOnline::loadWebList()
char *line = strtok(mMemoryBuffer, "\n");
const std::string gmText = "(GM)";
- for (std::set<OnlinePlayer*>::iterator itd = mOnlinePlayers.begin(),
- itd_end = mOnlinePlayers.end(); itd != itd_end; ++ itd)
- {
+ FOR_EACH (std::set<OnlinePlayer*>::iterator, itd, mOnlinePlayers)
delete *itd;
- }
mOnlinePlayers.clear();
mOnlineNicks.clear();