Menu

[0b4401]: / PythonScript / src / StaticIDAllocator.cpp  Maximize  Restore  History

Download this file

18 lines (13 with data), 288 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#include "stdafx.h"
#include "StaticIDAllocator.h"
bool StaticIDAllocator::allocate(size_t quantity, idx_t *start)
{
bool retVal = false;
if (m_current + quantity <= m_maximum)
{
*start = m_current;
m_current += quantity;
retVal = true;
}
return retVal;
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.