Fix some more warnings
Former-commit-id: d5a845b6a2c468c08e1c40ccbcfc87b2a49f67be [formerly 8829226909d7280607fcdf6bba6b2b79ca0eec1d] Former-commit-id: af76bbeec9543055d14ec142726cc4b85afa1985
This commit is contained in:
parent
d90a735372
commit
108a6af39f
|
|
@ -51,7 +51,7 @@ namespace Ndk
|
||||||
BaseComponent& component = *m_components[index].get();
|
BaseComponent& component = *m_components[index].get();
|
||||||
component.SetEntity(this);
|
component.SetEntity(this);
|
||||||
|
|
||||||
for (unsigned int i = m_componentBits.FindFirst(); i != m_componentBits.npos; i = m_componentBits.FindNext(i))
|
for (std::size_t i = m_componentBits.FindFirst(); i != m_componentBits.npos; i = m_componentBits.FindNext(i))
|
||||||
{
|
{
|
||||||
if (i != index)
|
if (i != index)
|
||||||
m_components[i]->OnComponentAttached(component);
|
m_components[i]->OnComponentAttached(component);
|
||||||
|
|
@ -73,8 +73,8 @@ namespace Ndk
|
||||||
|
|
||||||
void Entity::RemoveAllComponents()
|
void Entity::RemoveAllComponents()
|
||||||
{
|
{
|
||||||
for (unsigned int i = m_componentBits.FindFirst(); i != m_componentBits.npos; i = m_componentBits.FindNext(i))
|
for (std::size_t i = m_componentBits.FindFirst(); i != m_componentBits.npos; i = m_componentBits.FindNext(i))
|
||||||
RemoveComponent(i);
|
RemoveComponent(static_cast<ComponentIndex>(i));
|
||||||
|
|
||||||
NazaraAssert(m_componentBits.TestNone(), "All components should be gone");
|
NazaraAssert(m_componentBits.TestNone(), "All components should be gone");
|
||||||
|
|
||||||
|
|
@ -90,7 +90,7 @@ namespace Ndk
|
||||||
{
|
{
|
||||||
// On récupère le component et on informe les composants du détachement
|
// On récupère le component et on informe les composants du détachement
|
||||||
BaseComponent& component = *m_components[index].get();
|
BaseComponent& component = *m_components[index].get();
|
||||||
for (unsigned int i = m_componentBits.FindFirst(); i != m_componentBits.npos; i = m_componentBits.FindNext(i))
|
for (std::size_t i = m_componentBits.FindFirst(); i != m_componentBits.npos; i = m_componentBits.FindNext(i))
|
||||||
{
|
{
|
||||||
if (i != index)
|
if (i != index)
|
||||||
m_components[i]->OnComponentDetached(component);
|
m_components[i]->OnComponentDetached(component);
|
||||||
|
|
@ -114,7 +114,7 @@ namespace Ndk
|
||||||
void Entity::Destroy()
|
void Entity::Destroy()
|
||||||
{
|
{
|
||||||
// On informe chaque système
|
// On informe chaque système
|
||||||
for (SystemIndex index = m_systemBits.FindFirst(); index != m_systemBits.npos; index = m_systemBits.FindNext(index))
|
for (std::size_t index = m_systemBits.FindFirst(); index != m_systemBits.npos; index = m_systemBits.FindNext(index))
|
||||||
{
|
{
|
||||||
if (m_world->HasSystem(index))
|
if (m_world->HasSystem(index))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ namespace Ndk
|
||||||
void World::Update()
|
void World::Update()
|
||||||
{
|
{
|
||||||
// Gestion des entités tuées depuis le dernier appel
|
// Gestion des entités tuées depuis le dernier appel
|
||||||
for (unsigned int i = m_killedEntities.FindFirst(); i != m_killedEntities.npos; i = m_killedEntities.FindNext(i))
|
for (std::size_t i = m_killedEntities.FindFirst(); i != m_killedEntities.npos; i = m_killedEntities.FindNext(i))
|
||||||
{
|
{
|
||||||
EntityBlock& block = m_entities[i];
|
EntityBlock& block = m_entities[i];
|
||||||
Entity& entity = block.entity;
|
Entity& entity = block.entity;
|
||||||
|
|
@ -127,7 +127,7 @@ namespace Ndk
|
||||||
m_killedEntities.Reset();
|
m_killedEntities.Reset();
|
||||||
|
|
||||||
// Gestion des entités nécessitant une mise à jour de leurs systèmes
|
// Gestion des entités nécessitant une mise à jour de leurs systèmes
|
||||||
for (unsigned int i = m_dirtyEntities.FindFirst(); i != m_dirtyEntities.npos; i = m_dirtyEntities.FindNext(i))
|
for (std::size_t i = m_dirtyEntities.FindFirst(); i != m_dirtyEntities.npos; i = m_dirtyEntities.FindNext(i))
|
||||||
{
|
{
|
||||||
NazaraAssert(i < m_entities.size(), "Entity index out of range");
|
NazaraAssert(i < m_entities.size(), "Entity index out of range");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue