summaryrefslogtreecommitdiff
path: root/src/guild.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-03-31 21:33:31 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-03-31 22:17:29 +0200
commit7e13e0f2cacc1e0e4177b73eaf71a430094cc58f (patch)
treed540584082be4a8eb494a59e018a5fe8e79d0943 /src/guild.cpp
parent9a0f5327c25c57963af837439d23a61c9510a6ac (diff)
downloadmana-7e13e0f2cacc1e0e4177b73eaf71a430094cc58f.tar.gz
mana-7e13e0f2cacc1e0e4177b73eaf71a430094cc58f.tar.bz2
mana-7e13e0f2cacc1e0e4177b73eaf71a430094cc58f.tar.xz
mana-7e13e0f2cacc1e0e4177b73eaf71a430094cc58f.zip
Removed some unused members from Party and Guild classes
Reviewed-by: Jared Adams
Diffstat (limited to 'src/guild.cpp')
-rw-r--r--src/guild.cpp30
1 files changed, 5 insertions, 25 deletions
diff --git a/src/guild.cpp b/src/guild.cpp
index d6ef80cf..029cde7f 100644
--- a/src/guild.cpp
+++ b/src/guild.cpp
@@ -29,11 +29,6 @@ GuildMember::GuildMember(Guild *guild, int id, const std::string &name):
{
}
-GuildMember::GuildMember(Guild *guild, int id):
- mId(id), mGuild(guild)
-{
-}
-
GuildMember::GuildMember(Guild *guild, const std::string &name):
Avatar(name), mId(0), mGuild(guild)
{
@@ -63,21 +58,6 @@ GuildMember *Guild::addMember(int id, const std::string &name)
return m;
}
-GuildMember *Guild::addMember(int id)
-{
- GuildMember *m;
- if ((m = getMember(id)))
- {
- return m;
- }
-
- m = new GuildMember(this, id);
-
- mMembers.push_back(m);
-
- return m;
-}
-
GuildMember *Guild::addMember(const std::string &name)
{
GuildMember *m;
@@ -93,9 +73,9 @@ GuildMember *Guild::addMember(const std::string &name)
return m;
}
-GuildMember *Guild::getMember(int id)
+GuildMember *Guild::getMember(int id) const
{
- MemberList::iterator itr = mMembers.begin(),
+ MemberList::const_iterator itr = mMembers.begin(),
itr_end = mMembers.end();
while (itr != itr_end)
{
@@ -107,13 +87,13 @@ GuildMember *Guild::getMember(int id)
return NULL;
}
-GuildMember *Guild::getMember(std::string name)
+GuildMember *Guild::getMember(const std::string &name) const
{
- MemberList::iterator itr = mMembers.begin(),
+ MemberList::const_iterator itr = mMembers.begin(),
itr_end = mMembers.end();
while (itr != itr_end)
{
- if((*itr)->getName() == name)
+ if ((*itr)->getName() == name)
{
return (*itr);
}