cleaned up MIAMI ifdefs

This commit is contained in:
aap
2020-05-05 18:06:38 +02:00
parent 2c0b82ec1a
commit e81652c2fc
46 changed files with 95 additions and 2006 deletions

View File

@@ -34,25 +34,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;
#ifndef MIAMI
m_allocPtr = 0;
#else
m_allocPtr = -1;
#endif
for(int i = 0; i < size; i++){
m_flags[i].id = 0;
m_flags[i].free = 1;
}
}
#ifdef MIAMI
CPool(int size, const char *name)
: CPool(size) {}
#endif
~CPool() {
Flush();
}