Change functions names in ECS

This commit is contained in:
Ulysse Cura 2024-10-17 18:25:00 +02:00
parent a206123854
commit 3917b4c966
1 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@
#include <vector>
#include "../ChannelManager.hpp"
using std::bitset, std::array, std::vector, std::unique_ptr, std::make_unique, std::move, std::forward, std::runtime_error, std::sort;
using std::bitset, std::array, std::vector, std::unique_ptr, std::make_unique, std::move, std::forward, std::runtime_error, std::sort, std::remove_if;
class Component;
class Entity;
@ -175,7 +175,7 @@ class Manager {
void refresh()
{
m_entities.erase(std::remove_if(m_entities.begin(), m_entities.end(),
m_entities.erase(remove_if(m_entities.begin(), m_entities.end(),
[](const unique_ptr<Entity> &mEntity) {
return !mEntity->isActive();
}),
@ -195,7 +195,7 @@ class Manager {
return m_entities.size();
}
void erase(std::size_t index)
void destroy(std::size_t index)
{
m_entities.at(index).get()->destroy();
}