summaryrefslogtreecommitdiff
path: root/src/gui/textfield.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-08 19:13:26 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-08 19:13:26 +0000
commit405c23831a4e1363f26f848215c8140f6d6d9f78 (patch)
treeedf8b8838f055a1b5d024a3976b49f5cddfa8c50 /src/gui/textfield.cpp
parente645ad2a139c332937813dd2a1e5424ded182e26 (diff)
downloadmana-client-405c23831a4e1363f26f848215c8140f6d6d9f78.tar.gz
mana-client-405c23831a4e1363f26f848215c8140f6d6d9f78.tar.bz2
mana-client-405c23831a4e1363f26f848215c8140f6d6d9f78.tar.xz
mana-client-405c23831a4e1363f26f848215c8140f6d6d9f78.zip
Added a 'dtor' helper functor to delete objects in arrays and containers using STL algorithms.
Diffstat (limited to 'src/gui/textfield.cpp')
-rw-r--r--src/gui/textfield.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/textfield.cpp b/src/gui/textfield.cpp
index ec3b55b4..aa9d04fd 100644
--- a/src/gui/textfield.cpp
+++ b/src/gui/textfield.cpp
@@ -32,6 +32,8 @@
#include "../resources/image.h"
#include "../resources/resourcemanager.h"
+#include "../utils/dtor.h"
+
int TextField::instances = 0;
ImageRect TextField::skin;
@@ -74,9 +76,7 @@ TextField::~TextField()
if (instances == 0)
{
- for (int a = 0; a < 9; a++) {
- delete skin.grid[a];
- }
+ for_each(skin.grid, skin.grid + 9, dtor<Image*>());
}
}