Fixes #66 warnings

This commit is contained in:
2016-02-01 17:53:01 +01:00
parent 0a43f8104e
commit a3d4eb65d5
18 changed files with 69 additions and 68 deletions
+2 -2
View File
@@ -64,7 +64,7 @@ void CapturePointSystem::UpdateComponent(EntityWrapper& capturePointEntity, Comp
std::map<std::string, int> nextPossibleCapturePoint;
nextPossibleCapturePoint["Red"] = -1;
nextPossibleCapturePoint["Blue"] = -1;
for (size_t i = 0; i < m_NumberOfCapturePoints; i++)
for (int i = 0; i < m_NumberOfCapturePoints; i++)
{
if (m_CapturePointNumberToEntityMap[i].HasComponent("Team")) {
continue;
@@ -93,7 +93,7 @@ void CapturePointSystem::UpdateComponent(EntityWrapper& capturePointEntity, Comp
//reset timers and reset the bool that triggers this
if (m_ResetTimers) {
for (size_t i = 0; i < m_NumberOfCapturePoints; i++)
for (int i = 0; i < m_NumberOfCapturePoints; i++)
{
ComponentWrapper& capturePoint = m_CapturePointNumberToEntityMap[i]["CapturePoint"];
if ((int)capturePoint["CapturePointNumber"] != nextPossibleCapturePoint["Red"] &&
+1 -1
View File
@@ -30,7 +30,7 @@ EntityWrapper SpawnerSystem::Spawn(EntityWrapper spawner, EntityWrapper parent /
if (spawnPoints.size() > 1) {
static std::random_device randomDevice;
static std::mt19937 randomGenerator(randomDevice());
std::uniform_int_distribution<> distribution(0, std::distance(spawnPoints.begin(), spawnPoints.end()) - 1);
std::uniform_int_distribution<> distribution(0, static_cast<int>(std::distance(spawnPoints.begin(), spawnPoints.end())) - 1);
auto randomSpawnPointIt = spawnPoints.begin();
std::advance(randomSpawnPointIt, distribution(randomGenerator));
spawnPoint = *randomSpawnPointIt;