summaryrefslogtreecommitdiffstats
path: root/src/MobSpawner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/MobSpawner.cpp')
-rw-r--r--src/MobSpawner.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/MobSpawner.cpp b/src/MobSpawner.cpp
index 05da5d01c..de8e01b8a 100644
--- a/src/MobSpawner.cpp
+++ b/src/MobSpawner.cpp
@@ -13,7 +13,7 @@ cMobSpawner::cMobSpawner(cMonster::eFamily a_MonsterFamily,const std::set<cMonst
m_NewPack(true),
m_MobType(cMonster::mtInvalidType)
{
- for (std::set<cMonster::eType>::const_iterator itr = a_AllowedTypes.begin(); itr != a_AllowedTypes.end(); itr++)
+ for (std::set<cMonster::eType>::const_iterator itr = a_AllowedTypes.begin(); itr != a_AllowedTypes.end(); ++itr)
{
if (cMonster::FamilyFromType(*itr) == a_MonsterFamily)
{
@@ -104,15 +104,15 @@ cMonster::eType cMobSpawner::ChooseMobType(EMCSBiome a_Biome)
}
}
- int allowedMobsSize = allowedMobs.size();
+ size_t allowedMobsSize = allowedMobs.size();
if (allowedMobsSize > 0)
{
std::set<cMonster::eType>::iterator itr = allowedMobs.begin();
- int iRandom = m_Random.NextInt(allowedMobsSize,a_Biome);
+ int iRandom = m_Random.NextInt((int)allowedMobsSize, a_Biome);
- for(int i = 0; i < iRandom; i++)
+ for (int i = 0; i < iRandom; i++)
{
- itr++;
+ ++itr;
}
return *itr;