commit 9e5e6db5b60332cf04add8d38e2932ed3067ce53 parent 831b115d3046cb4e8941d1e1df188aa4d40705fd Author: Michael Savage <mikejsavage@gmail.com> Date: Sun Dec 11 14:40:20 +0200 Add Pool::clear Diffstat:
pool.h | | | 4 | ++++ |
diff --git a/pool.h b/pool.h @@ -38,6 +38,10 @@ template< typename T, u32 N > class Pool { public: Pool() { + clear(); + } + + void clear() { for( u32 i = 0; i < N; i++ ) { nexts[ i ] = i + 1; }