From 6221d74644922ea4bbba3ed9cd8bbec42398f77b Mon Sep 17 00:00:00 2001 From: smatz Date: Sat, 16 May 2009 23:34:14 +0000 Subject: (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) --- src/oldpool.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/oldpool.h') diff --git a/src/oldpool.h b/src/oldpool.h index 9e49e22b3..14e31a1bd 100644 --- a/src/oldpool.h +++ b/src/oldpool.h @@ -277,6 +277,14 @@ struct PoolItem { Tpool->UpdateFirstFreeIndex(pn->index); } + /** + * Get item with given index + */ + static FORCEINLINE T *Get(uint index) + { + return Tpool->Get(index); + } + private: static T *AllocateSafeRaw(uint &first); @@ -326,7 +334,6 @@ public: #define OLD_POOL_ACCESSORS(name, type) \ - static inline type *Get##name(uint index) { return _##name##_pool.Get(index); } \ static inline uint Get##name##PoolSize() { return _##name##_pool.GetSize(); } @@ -352,6 +359,7 @@ public: #define STATIC_OLD_POOL(name, type, block_size_bits, max_blocks, new_block_proc, clean_block_proc) \ OLD_POOL_ENUM(name, type, block_size_bits, max_blocks) \ static DEFINE_OLD_POOL(name, type, new_block_proc, clean_block_proc) \ - OLD_POOL_ACCESSORS(name, type) + OLD_POOL_ACCESSORS(name, type) \ + static inline type *Get##name(uint index) { return _##name##_pool.Get(index); } #endif /* OLDPOOL_H */ -- cgit v1.2.3-70-g09d2