diff options
author | peterbell10 <peterbell10@live.co.uk> | 2017-06-14 17:35:34 +0200 |
---|---|---|
committer | Lukas Pioch <lukas@zgow.de> | 2017-06-16 07:07:02 +0200 |
commit | f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3 (patch) | |
tree | 4e418ba9a31e4d1d4bcac6c0adb468ac32636569 /src/MobSpawner.cpp | |
parent | Entity: Replaced a mutexed counter with a std::atomic. (#3773) (diff) | |
download | cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar.gz cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar.bz2 cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar.lz cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar.xz cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.tar.zst cuberite-f4de38af80cac5bdf6dc51dbbbbf86451cc2acc3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/MobSpawner.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/MobSpawner.cpp b/src/MobSpawner.cpp index 98c428bab..2ddf60bbd 100644 --- a/src/MobSpawner.cpp +++ b/src/MobSpawner.cpp @@ -112,7 +112,8 @@ eMonsterType cMobSpawner::ChooseMobType(EMCSBiome a_Biome) { std::set<eMonsterType>::iterator itr = allowedMobs.begin(); - std::advance(itr, GetRandomProvider().RandInt<size_t>(allowedMobsSize - 1)); + using DiffType = decltype(itr)::difference_type; + std::advance(itr, GetRandomProvider().RandInt<DiffType>(allowedMobsSize - 1)); return *itr; } |