(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)

This commit is contained in:
smatz
2009-05-16 23:34:14 +00:00
parent 814f153b5a
commit 6221d74644
116 changed files with 645 additions and 637 deletions

View File

@@ -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 */