diff options
Diffstat (limited to 'src/oldpool.h')
-rw-r--r-- | src/oldpool.h | 12 |
1 files changed, 10 insertions, 2 deletions
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 */ |