summaryrefslogtreecommitdiff
path: root/src/guild.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-28 15:23:03 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-28 15:23:03 +0300
commit5ae7168e1f30efa4fd61c155eaecd55ce83bea14 (patch)
tree617af9417f6b4175fdf4ba0691dd5c4ac28e427e /src/guild.cpp
parent096de2a656c036a241dd5f10c2bf28ae4d4dbe5a (diff)
downloadmv-5ae7168e1f30efa4fd61c155eaecd55ce83bea14.tar.gz
mv-5ae7168e1f30efa4fd61c155eaecd55ce83bea14.tar.bz2
mv-5ae7168e1f30efa4fd61c155eaecd55ce83bea14.tar.xz
mv-5ae7168e1f30efa4fd61c155eaecd55ce83bea14.zip
improve guild related files.
Diffstat (limited to 'src/guild.cpp')
-rw-r--r--src/guild.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/guild.cpp b/src/guild.cpp
index c7ad34c30..09ff80cc7 100644
--- a/src/guild.cpp
+++ b/src/guild.cpp
@@ -235,9 +235,12 @@ void Guild::removeFromMembers()
const MemberList::const_iterator itr_end = mMembers.end();
while (itr != itr_end)
{
- Being *const b = actorSpriteManager->findBeing((*itr)->getID());
- if (b)
- b->removeGuild(getId());
+ if (*itr)
+ {
+ Being *const b = actorSpriteManager->findBeing((*itr)->getID());
+ if (b)
+ b->removeGuild(mId);
+ }
++itr;
}
}
@@ -319,7 +322,7 @@ void Guild::getNames(StringVect &names) const
}
}
-void Guild::addPos(const int id, std::string name)
+void Guild::addPos(const int id, const std::string &name)
{
mPositions[id] = name;
}