diff --git a/SDK/include/NDK/EntityList.hpp b/SDK/include/NDK/EntityList.hpp index 8303f7fa4..4620837a0 100644 --- a/SDK/include/NDK/EntityList.hpp +++ b/SDK/include/NDK/EntityList.hpp @@ -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; diff --git a/SDK/include/NDK/EntityList.inl b/SDK/include/NDK/EntityList.inl index 8d871e2c6..0a6809a3a 100644 --- a/SDK/include/NDK/EntityList.inl +++ b/SDK/include/NDK/EntityList.inl @@ -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 {