diff options
author | smatz <smatz@openttd.org> | 2011-02-19 23:05:47 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2011-02-19 23:05:47 +0000 |
commit | 756cc6cf651aa5650f055c70f31f7e07391be8c6 (patch) | |
tree | 8bf5af85e6523ad91ce99606e2b068b9f7513976 /src/core/pool_func.cpp | |
parent | 642fb19d4fe4fbb249ddc314f75a35282ce6d28d (diff) | |
download | openttd-756cc6cf651aa5650f055c70f31f7e07391be8c6.tar.xz |
(svn r22116) -Codechange: use PoolBase::Clean() at more places
Diffstat (limited to 'src/core/pool_func.cpp')
-rw-r--r-- | src/core/pool_func.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/pool_func.cpp b/src/core/pool_func.cpp index 7b65b96a4..999dbe3d9 100644 --- a/src/core/pool_func.cpp +++ b/src/core/pool_func.cpp @@ -24,14 +24,15 @@ PoolBase::~PoolBase() } /** - * Clean all pools - calls Pool::CleanPool() + * Clean all pools of given type. + * @param pt pool types to clean. */ -/* static */ void PoolBase::CleanAll() +/* static */ void PoolBase::Clean(PoolType pt) { PoolVector *pools = PoolBase::GetPools(); PoolBase **end = pools->End(); for (PoolBase **ppool = pools->Begin(); ppool != end; ppool++) { PoolBase *pool = *ppool; - pool->CleanPool(); + if (pool->type & pt) pool->CleanPool(); } } |