diff --git a/src/pool.hpp b/src/pool.hpp index 33eb40f..5d2203b 100644 --- a/src/pool.hpp +++ b/src/pool.hpp @@ -15,11 +15,13 @@ namespace CosmoTool PoolNode *next; }; + template class MemoryPool; + template class MemoryIterator { private: - friend class MemoryPool; + friend class MemoryPool; PoolNode *cur, *previous; uint32_t in_node; @@ -41,7 +43,7 @@ namespace CosmoTool in_node = i.in_node; } - bool MemoryIterator::operator==(const MemoryIterator& i) const + bool operator==(const MemoryIterator& i) const { return (cur == i.cur) && (in_node == i.in_node); } @@ -82,7 +84,7 @@ namespace CosmoTool private: uint32_t m_allocSize; PoolNode *head, *current; - typedef typename MemoryIterator iterator; + typedef MemoryIterator iterator; public: MemoryPool(uint32_t allocSize) : m_allocSize(allocSize), head(0), current(0) {}