Fix some more warnings
Former-commit-id: 3ce21e64373163c1ae9f7803760c897e5334b726 [formerly f1e054d5acd1e19bba6e61fca71d3bb1148bb4bb] Former-commit-id: 9a2bded15c3c34c3c8a96aa45ec53ff1c500e740
This commit is contained in:
parent
a277e7560f
commit
01428dcde3
|
|
@ -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