Sdk: Make World moveable

Former-commit-id: 285cb9da4cbafd3da0c0859eb9d366bb2fb978a3
This commit is contained in:
Lynix
2016-03-01 14:01:31 +01:00
parent 36067e31c4
commit dbce7592a9
8 changed files with 47 additions and 14 deletions

View File

@@ -23,9 +23,9 @@ namespace Ndk
handle->OnEntityMoved(this);
}
Entity::Entity(World& world, EntityId id) :
Entity::Entity(World* world, EntityId id) :
m_id(id),
m_world(&world)
m_world(world)
{
}

View File

@@ -46,7 +46,7 @@ namespace Ndk
id = m_entities.size();
// Impossible d'utiliser emplace_back à cause de la portée
m_entities.push_back(Entity(*this, id));
m_entities.push_back(Entity(this, id));
}
// On initialise l'entité et on l'ajoute à la liste des entités vivantes
@@ -59,7 +59,7 @@ namespace Ndk
return m_aliveEntities.back();
}
void World::Clear()
void World::Clear() noexcept
{
///DOC: Tous les handles sont correctement invalidés