summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2011-02-19 18:55:10 +0000
committersmatz <smatz@openttd.org>2011-02-19 18:55:10 +0000
commit642fb19d4fe4fbb249ddc314f75a35282ce6d28d (patch)
treefde1029ef16c8736b39c6e69a4923bdb65758333
parentef80fe703d94d65eac7c2b476ef118630f10eebb (diff)
downloadopenttd-642fb19d4fe4fbb249ddc314f75a35282ce6d28d.tar.xz
(svn r22115) -Fix (r22114): some comments and code ordering were wrong
-rw-r--r--src/core/pool_func.cpp7
-rw-r--r--src/core/pool_type.hpp7
-rw-r--r--src/openttd.cpp4
3 files changed, 9 insertions, 9 deletions
diff --git a/src/core/pool_func.cpp b/src/core/pool_func.cpp
index 4c55293eb..7b65b96a4 100644
--- a/src/core/pool_func.cpp
+++ b/src/core/pool_func.cpp
@@ -12,6 +12,10 @@
#include "../stdafx.h"
#include "pool_type.hpp"
+/**
+ * Destructor removes this object from the pool vector and
+ * deletes the vector itself if this was the last item removed.
+ */
PoolBase::~PoolBase()
{
PoolVector *pools = PoolBase::GetPools();
@@ -19,6 +23,9 @@ PoolBase::~PoolBase()
if (pools->Length() == 0) delete pools;
}
+/**
+ * Clean all pools - calls Pool::CleanPool()
+ */
/* static */ void PoolBase::CleanAll()
{
PoolVector *pools = PoolBase::GetPools();
diff --git a/src/core/pool_type.hpp b/src/core/pool_type.hpp
index e96608bdb..9f4f8d99c 100644
--- a/src/core/pool_type.hpp
+++ b/src/core/pool_type.hpp
@@ -28,9 +28,6 @@ struct PoolBase {
return pools;
}
- /**
- * Clean all pools - calls Pool::CleanPool()
- */
static void CleanAll();
/**
@@ -41,10 +38,6 @@ struct PoolBase {
*PoolBase::GetPools()->Append() = this;
}
- /**
- * Destructor removes this object from the pool vector and
- * deletes the vector itself if this was the last item removed.
- */
~PoolBase();
/**
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 829b51a4c..a39ef57e8 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -270,10 +270,10 @@ static void ShutdownGame()
free(_config_file);
#endif
- ResetNewGRFData();
-
PoolBase::CleanAll();
+ ResetNewGRFData();
+
/* Close all and any open filehandles */
FioCloseAll();
}