From 7e13e0f2cacc1e0e4177b73eaf71a430094cc58f Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Wed, 31 Mar 2010 21:33:31 +0200 Subject: Removed some unused members from Party and Guild classes Reviewed-by: Jared Adams --- src/guild.cpp | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) (limited to 'src/guild.cpp') 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); } -- cgit v1.2.3-70-g09d2