diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-03-24 16:50:48 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-03-24 16:50:48 +0100 |
commit | ef0fecc856d435ff140ce87ca38618d6edceafcc (patch) | |
tree | 5871c4a21f41ceee8db03fd55b3f23564bf5cdb8 /src/coremods | |
parent | facea197311f9dfbd9401b32b18cfd1245ff9be4 (diff) |
Add stdalgo::delete_all() that deletes all elements in a container
Diffstat (limited to 'src/coremods')
-rw-r--r-- | src/coremods/core_whowas.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/coremods/core_whowas.cpp b/src/coremods/core_whowas.cpp index 0a3a994a8..0227fdb51 100644 --- a/src/coremods/core_whowas.cpp +++ b/src/coremods/core_whowas.cpp @@ -119,8 +119,7 @@ void CommandWhowas::AddToWhoWas(User* user) if (it != whowas.end()) { whowas_set* set = it->second; - for (whowas_set::iterator i = set->begin(); i != set->end(); ++i) - delete *i; + stdalgo::delete_all(*set); delete set; whowas.erase(it); @@ -164,8 +163,7 @@ void CommandWhowas::Prune() } whowas_set* set = iter->second; - for (whowas_set::iterator i = set->begin(); i != set->end(); ++i) - delete *i; + stdalgo::delete_all(*set); delete set; whowas.erase(iter); |