Fix some warnings from MSVC

This commit is contained in:
Lynix
2016-11-10 16:44:29 +01:00
parent 8ed34d22fb
commit 7f445def13
19 changed files with 96 additions and 97 deletions

View File

@@ -148,9 +148,11 @@ namespace Ndk
// We alert each system
for (std::size_t index = m_systemBits.FindFirst(); index != m_systemBits.npos; index = m_systemBits.FindNext(index))
{
if (m_world->HasSystem(index))
auto sysIndex = static_cast<Ndk::SystemIndex>(index);
if (m_world->HasSystem(sysIndex))
{
BaseSystem& system = m_world->GetSystem(index);
BaseSystem& system = m_world->GetSystem(sysIndex);
system.RemoveEntity(this);
}
}

View File

@@ -174,7 +174,7 @@ namespace Ndk
case 16:
{
double values[16];
for (std::size_t i = 0; i < 16; ++i)
for (int i = 0; i < 16; ++i)
values[i] = lua.CheckNumber(i);
Nz::PlacementNew(matrix, values);

View File

@@ -67,7 +67,7 @@ namespace Ndk
else
{
// We allocate a new entity
id = m_entities.size();
id = static_cast<Ndk::EntityId>(m_entities.size());
// We can't use emplace_back due to the scope
m_entities.push_back(Entity(this, id));
@@ -221,7 +221,7 @@ namespace Ndk
Nz::Bitset<>& removedComponents = entity->GetRemovedComponentBits();
for (std::size_t j = removedComponents.FindFirst(); j != m_dirtyEntities.npos; j = removedComponents.FindNext(j))
entity->DestroyComponent(j);
entity->DestroyComponent(static_cast<Ndk::ComponentIndex>(j));
removedComponents.Reset();
for (auto& system : m_orderedSystems)