diff options
Diffstat (limited to 'src/chat-server')
-rw-r--r-- | src/chat-server/chathandler.cpp | 6 | ||||
-rw-r--r-- | src/chat-server/guild.hpp | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/chat-server/chathandler.cpp b/src/chat-server/chathandler.cpp index 43a917ff..d19aa8cf 100644 --- a/src/chat-server/chathandler.cpp +++ b/src/chat-server/chathandler.cpp @@ -695,8 +695,10 @@ ChatHandler::handleGuildRetrieveMembers(ChatClient &client, MessageIn &msg) { reply.writeByte(ERRMSG_OK); reply.writeShort(guildId); - for(std::list<GuildMember*>::const_iterator itr = guild->getMembers().begin(); - itr != guild->getMembers().end(); ++itr) + std::list<GuildMember*> memberList = guild->getMembers(); + std::list<GuildMember*>::const_iterator itr_end = memberList.end(); + for(std::list<GuildMember*>::iterator itr = memberList.begin(); + itr != itr_end; ++itr) { reply.writeString((*itr)->getName()); reply.writeByte(mPlayerMap.find((*itr)->getName()) != mPlayerMap.end()); diff --git a/src/chat-server/guild.hpp b/src/chat-server/guild.hpp index ae8120f4..050dc17f 100644 --- a/src/chat-server/guild.hpp +++ b/src/chat-server/guild.hpp @@ -124,7 +124,7 @@ class Guild /** * Returns the name of the guild. */ - const std::string& getName() const + std::string getName() const { return mName; } /** |