diff options
author | David Athay <ko2fan@gmail.com> | 2009-04-23 17:03:11 +0100 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2009-04-23 17:03:11 +0100 |
commit | d48980a532d1d10593fbef888d4355015afc7936 (patch) | |
tree | 0248f32ba93b86873450985496a047e8a2a31268 | |
parent | b31f0bf7e5c4575f57684692f1e1f36aba5eed51 (diff) | |
download | manaserv-d48980a532d1d10593fbef888d4355015afc7936.tar.gz manaserv-d48980a532d1d10593fbef888d4355015afc7936.tar.bz2 manaserv-d48980a532d1d10593fbef888d4355015afc7936.tar.xz manaserv-d48980a532d1d10593fbef888d4355015afc7936.zip |
Break from while loops when found.
-rw-r--r-- | src/chat-server/partyhandler.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/chat-server/partyhandler.cpp b/src/chat-server/partyhandler.cpp index e60c2e0c..d549b3c2 100644 --- a/src/chat-server/partyhandler.cpp +++ b/src/chat-server/partyhandler.cpp @@ -146,12 +146,9 @@ void ChatHandler::handlePartyAcceptInvite(ChatClient &client, MessageIn &msg) { out.writeByte(ERRMSG_OK); mPartyInvitedUsers.erase(itr); + found = true; + break; } - else - { - out.writeByte(ERRMSG_FAILURE); - } - found = true; } ++itr; @@ -198,6 +195,7 @@ void ChatHandler::handlePartyRejection(ChatClient &client, MessageIn &msg) // remove them from invited users list mPartyInvitedUsers.erase(itr); found = true; + break; } ++itr; |