diff options
Diffstat (limited to 'game/objectives')
-rw-r--r-- | game/objectives/freeroam.cpp | 2 | ||||
-rw-r--r-- | game/objectives/goto.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/game/objectives/freeroam.cpp b/game/objectives/freeroam.cpp index 0721ef2..b569d36 100644 --- a/game/objectives/freeroam.cpp +++ b/game/objectives/freeroam.cpp @@ -17,6 +17,6 @@ Link::Next FreeRoam::navigate(Link::Nexts::const_iterator begin, Link::Nexts::const_iterator end) const { static std::mt19937 gen(std::random_device {}()); - auto off = std::uniform_int_distribution<>(0, std::distance(begin, end) - 1)(gen); + auto off = std::uniform_int_distribution<long>(0, std::distance(begin, end) - 1)(gen); return begin[off]; } diff --git a/game/objectives/goto.cpp b/game/objectives/goto.cpp index c089bc3..8581a2d 100644 --- a/game/objectives/goto.cpp +++ b/game/objectives/goto.cpp @@ -17,7 +17,7 @@ GoTo::GoTo(Orders * o, const Link::End & cp, float d, const NodePtr & dest) : ActivityPtr GoTo::createActivity() const { - return std::make_unique<Go>(std::accumulate(links.begin(), links.end(), 0, + return std::make_unique<Go>(std::accumulate(links.begin(), links.end(), 0.F, [](auto p, const auto & l) { return p += l.first.lock()->length; }) |