mirror of
https://github.com/tribes2/engine.git
synced 2026-01-20 11:44:46 +00:00
22 lines
581 B
C++
22 lines
581 B
C++
//-----------------------------------------------------------------------------
|
|
// V12 Engine
|
|
//
|
|
// Copyright (c) 2001 GarageGames.Com
|
|
// Portions Copyright (c) 2001 by Sierra Online, 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();
|
|
}
|
|
}
|
|
|