summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-25 02:26:34 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-25 02:26:34 +0300
commitc9f43996f3147100627ee2c6f9da993ceb160113 (patch)
tree7577f02f4658b19e05d586f66b67a9a4f5fedb7e /src/localplayer.cpp
parent8e19f9b9d792cf4d3d3b022fd26a258c3d3d97bf (diff)
downloadmv-c9f43996f3147100627ee2c6f9da993ceb160113.tar.gz
mv-c9f43996f3147100627ee2c6f9da993ceb160113.tar.bz2
mv-c9f43996f3147100627ee2c6f9da993ceb160113.tar.xz
mv-c9f43996f3147100627ee2c6f9da993ceb160113.zip
Improve iterators part 2.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 9dc23a4c7..6cf02bf4a 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -909,9 +909,8 @@ void LocalPlayer::inviteToGuild(Being *being)
// TODO: Allow user to choose which guild to invite being to
// For now, just invite to the first guild you have permissions to invite with
- std::map<int, Guild*>::const_iterator itr = mGuilds.begin();
- std::map<int, Guild*>::const_iterator itr_end = mGuilds.end();
- for (; itr != itr_end; ++itr)
+ for (std::map<int, Guild*>::const_iterator itr = mGuilds.begin(),
+ itr_end = mGuilds.end(); itr != itr_end; ++itr)
{
if (itr->second && checkInviteRights(itr->second->getName()))
{
@@ -3402,8 +3401,8 @@ void LocalPlayer::saveHomes()
std::string homeStr;
std::stringstream ss(homeStr);
- for (std::map<std::string, Vector>::const_iterator iter = mHomes.begin();
- iter != mHomes.end(); ++iter )
+ for (std::map<std::string, Vector>::const_iterator iter = mHomes.begin(),
+ iter_end = mHomes.end(); iter != iter_end; ++iter )
{
Vector pos = (*iter).second;