Initial commit
This commit is contained in:
19
engine/core/idGenerator.cc
Executable file
19
engine/core/idGenerator.cc
Executable file
@@ -0,0 +1,19 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
// Copyright (C) GarageGames.com, Inc.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "core/idGenerator.h"
|
||||
|
||||
void IdGenerator::reclaim()
|
||||
{
|
||||
// attempt to keep the pool vector as small as possible by reclaiming
|
||||
// pool entries back into the nextIdBlock variable
|
||||
|
||||
while (!mPool.empty() && (mPool.last() == (mNextId-1)) )
|
||||
{
|
||||
mNextId--;
|
||||
mPool.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user