Added Reserve function in Ndk::EntityList (#134)
This commit is contained in:
parent
5915b6ce3a
commit
9f52932327
|
|
@ -35,6 +35,7 @@ namespace Ndk
|
|||
inline void Insert(Entity* entity);
|
||||
|
||||
inline void Remove(Entity* entity);
|
||||
inline void Reserve(std::size_t entityCount);
|
||||
|
||||
// STL API
|
||||
inline iterator begin() const;
|
||||
|
|
|
|||
|
|
@ -137,6 +137,16 @@ namespace Ndk
|
|||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Reserves enough space to contains entityCount entities
|
||||
*
|
||||
* \param entityCount Number of entities to reserve
|
||||
*/
|
||||
inline void EntityList::Reserve(std::size_t entityCount)
|
||||
{
|
||||
m_entityBits.Reserve(entityCount);
|
||||
}
|
||||
|
||||
// STL Interface
|
||||
inline EntityList::iterator EntityList::begin() const
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue