summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-12-13 15:59:25 +0000
committersmatz <smatz@openttd.org>2008-12-13 15:59:25 +0000
commit3cd29575445a7f4b9861f6f80d209244bf58a608 (patch)
treef7d53055629d646fc78ce07c0d156d85e17b6d46 /src/core
parent0bf775a20a4cd232e13e13f215bb6894b209acd7 (diff)
downloadopenttd-3cd29575445a7f4b9861f6f80d209244bf58a608.tar.xz
(svn r14669) -Codechange: use SmallVector instead of std::list at one place
Diffstat (limited to 'src/core')
-rw-r--r--src/core/smallvec_type.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/smallvec_type.hpp b/src/core/smallvec_type.hpp
index 709ff70f0..464274c4d 100644
--- a/src/core/smallvec_type.hpp
+++ b/src/core/smallvec_type.hpp
@@ -45,6 +45,17 @@ public:
}
/**
+ * Remove all items from the list and free allocated memory.
+ */
+ void Reset()
+ {
+ this->items = 0;
+ this->capacity = 0;
+ free(data);
+ data = NULL;
+ }
+
+ /**
* Compact the list down to the smallest block size boundary.
*/
FORCEINLINE void Compact()