From 6aa293c687835a2148e735ad1f39dd0badf3d8e9 Mon Sep 17 00:00:00 2001 From: Tom Leese Date: Tue, 7 Aug 2012 21:55:03 +0100 Subject: Changed to using delete_all instead of a loop Reviewed-by: Erik Schilling. --- src/gui/specialswindow.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src') 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 &specialData) { - // remove current entries so they don't get drawn underneath - for (std::map::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 -- cgit v1.2.3-70-g09d2