diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-06-04 17:00:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-06-04 17:00:09 +0300 |
commit | e668ab141d6b006b790d2b0a8fc515d13b78317e (patch) | |
tree | b4aa71e9a4af62c948183328bbf74c2e1bf4eb84 /src/party.cpp | |
parent | 98cc93d2321b9be0a2a5ae6bf67aecf6adcdd2fb (diff) | |
download | manaplus-e668ab141d6b006b790d2b0a8fc515d13b78317e.tar.gz manaplus-e668ab141d6b006b790d2b0a8fc515d13b78317e.tar.bz2 manaplus-e668ab141d6b006b790d2b0a8fc515d13b78317e.tar.xz manaplus-e668ab141d6b006b790d2b0a8fc515d13b78317e.zip |
Cleanup part list and beinginfo.
Diffstat (limited to 'src/party.cpp')
-rw-r--r-- | src/party.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/party.cpp b/src/party.cpp index e3ea497ac..f3f787807 100644 --- a/src/party.cpp +++ b/src/party.cpp @@ -292,4 +292,15 @@ Party *Party::getParty(short id) void Party::sort() { std::sort(mMembers.begin(), mMembers.end(), partySorter); -}
\ No newline at end of file +} + +void Party::clearParties() +{ + PartyMap::iterator it = parties.begin(); + while (it != parties.end()) + { + delete (*it).second; + ++ it; + } + parties.clear(); +} |