medfall

A super great game engine
Log | Files | Refs

commit 11b31ad67bcea7ed54f143b99ecc65fecce450d3
parent 566ae3528146390b19d4b7ccce3e97f386c322f8
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sat Jun 17 12:37:45 +0300

Even simpler Pool

Diffstat:
pool.h | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pool.h b/pool.h @@ -7,7 +7,7 @@ template< typename T, size_t N > struct Pool { public: Pool() { - elems = array< T >( elems_memory.ptr(), 0 ); + elems = array< T >( memory, 0 ); } T * acquire() { @@ -29,6 +29,7 @@ public: elems.n = 0; } - StaticArray< T, N > elems_memory; + + T memory[ N ]; array< T > elems; };