fixed compile
This commit is contained in:
parent
f6af584efa
commit
a2df68b80b
@ -19,7 +19,7 @@ class cAllocationPool {
|
||||
cAllocationPool(std::auto_ptr<cStarvationCallbacks> a_Callbacks) :
|
||||
m_Callbacks(a_Callbacks)
|
||||
{
|
||||
for(int i = 0; i < NumElementsInReserve; i++)
|
||||
for(size_t i = 0; i < NumElementsInReserve; i++)
|
||||
{
|
||||
void * space = malloc(sizeof(T));
|
||||
if (space == NULL)
|
||||
|
@ -17,7 +17,15 @@
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
// Set up a cChunkData with known contents - all blocks 0x01, all metas 0x02:
|
||||
cChunkData Data;
|
||||
class cStarvationCallbacks
|
||||
: public cAllocationPool<cChunkData::sChunkSection,1600>::cStarvationCallbacks
|
||||
{
|
||||
virtual void OnStartingUsingBuffer() {}
|
||||
virtual void OnStopUsingBuffer() {}
|
||||
virtual void OnBufferEmpty() {}
|
||||
};
|
||||
cAllocationPool<cChunkData::sChunkSection,1600> Pool(std::auto_ptr<cAllocationPool<cChunkData::sChunkSection,1600>::cStarvationCallbacks>(new cStarvationCallbacks()));
|
||||
cChunkData Data(Pool);
|
||||
cChunkDef::BlockTypes BlockTypes;
|
||||
cChunkDef::BlockNibbles BlockMetas;
|
||||
memset(BlockTypes, 0x01, sizeof(BlockTypes));
|
||||
|
Loading…
Reference in New Issue
Block a user