mirror of https://github.com/OpenTTD/OpenTTD
(svn r22115) -Fix (r22114): some comments and code ordering were wrong
parent
ef80fe703d
commit
642fb19d4f
|
@ -12,6 +12,10 @@
|
||||||
#include "../stdafx.h"
|
#include "../stdafx.h"
|
||||||
#include "pool_type.hpp"
|
#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()
|
PoolBase::~PoolBase()
|
||||||
{
|
{
|
||||||
PoolVector *pools = PoolBase::GetPools();
|
PoolVector *pools = PoolBase::GetPools();
|
||||||
|
@ -19,6 +23,9 @@ PoolBase::~PoolBase()
|
||||||
if (pools->Length() == 0) delete pools;
|
if (pools->Length() == 0) delete pools;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clean all pools - calls Pool::CleanPool()
|
||||||
|
*/
|
||||||
/* static */ void PoolBase::CleanAll()
|
/* static */ void PoolBase::CleanAll()
|
||||||
{
|
{
|
||||||
PoolVector *pools = PoolBase::GetPools();
|
PoolVector *pools = PoolBase::GetPools();
|
||||||
|
|
|
@ -28,9 +28,6 @@ struct PoolBase {
|
||||||
return pools;
|
return pools;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Clean all pools - calls Pool::CleanPool()
|
|
||||||
*/
|
|
||||||
static void CleanAll();
|
static void CleanAll();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,10 +38,6 @@ struct PoolBase {
|
||||||
*PoolBase::GetPools()->Append() = this;
|
*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();
|
~PoolBase();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -270,10 +270,10 @@ static void ShutdownGame()
|
||||||
free(_config_file);
|
free(_config_file);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ResetNewGRFData();
|
|
||||||
|
|
||||||
PoolBase::CleanAll();
|
PoolBase::CleanAll();
|
||||||
|
|
||||||
|
ResetNewGRFData();
|
||||||
|
|
||||||
/* Close all and any open filehandles */
|
/* Close all and any open filehandles */
|
||||||
FioCloseAll();
|
FioCloseAll();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue