diff --git a/lplanes_pool.cpp b/lplanes_pool.cpp index d06923a..f8a1e25 100644 --- a/lplanes_pool.cpp +++ b/lplanes_pool.cpp @@ -13,36 +13,29 @@ LPlanesPool::LPlanesPool() void LPlanesPool::Reset() { - memset(m_ucTaken, 0, sizeof ( m_ucTaken)); - m_uiCount = 0; + for (int n=0; n= POOL_MAX) + if (!m_uiNumFree) return -1; - // could be done more efficiently .. NYI - for (unsigned int n=0; n m_Planes[ POOL_MAX]; - unsigned char m_ucTaken[POOL_MAX]; - unsigned int m_uiCount; + + uint8_t m_ucFreeList[POOL_MAX]; + uint32_t m_uiNumFree; };