diff options
Diffstat (limited to 'src/core/templates.h')
-rw-r--r-- | src/core/templates.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/templates.h b/src/core/templates.h index 69844fa4..aa71fe5d 100644 --- a/src/core/templates.h +++ b/src/core/templates.h @@ -44,18 +44,20 @@ class CPool int m_allocPtr; public: + // TODO(MIAMI): remove ctor without name argument CPool(int size){ // TODO: use new here m_entries = (U*)malloc(sizeof(U)*size); m_flags = (Flags*)malloc(sizeof(Flags)*size); m_size = size; - m_allocPtr = 0; + m_allocPtr = -1; for(int i = 0; i < size; i++){ m_flags[i].id = 0; m_flags[i].free = 1; } } - + CPool(int size, const char *name) + : CPool(size) {} ~CPool() { Flush(); } |