summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Leese <leese.thomas81@gmail.com>2012-08-07 21:55:03 +0100
committerErik Schilling <ablu.erikschilling@googlemail.com>2012-08-08 12:26:21 +0200
commit6aa293c687835a2148e735ad1f39dd0badf3d8e9 (patch)
treee9932b9bc08bb2e6ab5545606e84930b47d7da5c
parent39c36efc9de6f31d64b6e0b5376989887b7e72e5 (diff)
downloadmana-client-6aa293c687835a2148e735ad1f39dd0badf3d8e9.tar.gz
mana-client-6aa293c687835a2148e735ad1f39dd0badf3d8e9.tar.bz2
mana-client-6aa293c687835a2148e735ad1f39dd0badf3d8e9.tar.xz
mana-client-6aa293c687835a2148e735ad1f39dd0badf3d8e9.zip
Changed to using delete_all instead of a loop
Reviewed-by: Erik Schilling.
-rw-r--r--src/gui/specialswindow.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/gui/specialswindow.cpp b/src/gui/specialswindow.cpp
index d96b5805..a163562b 100644
--- a/src/gui/specialswindow.cpp
+++ b/src/gui/specialswindow.cpp
@@ -160,14 +160,8 @@ void SpecialsWindow::draw(gcn::Graphics *graphics)
void SpecialsWindow::rebuild(const std::map<int, Special> &specialData)
{
- // remove current entries so they don't get drawn underneath
- for (std::map<int, SpecialEntry *>::const_iterator it = mEntries.begin();
- it != mEntries.end(); ++it)
- {
- remove(it->second);
- }
-
- make_dtor(mEntries);
+ delete_all(mEntries);
+
mEntries.clear();
int vPos = 0; //vertical position of next placed element