diff --git a/src/random.hpp b/src/random.hpp index d388eff..894f458 100644 --- a/src/random.hpp +++ b/src/random.hpp @@ -27,7 +27,7 @@ namespace sc { template static T choice(const std::vector& vec) { - std::uniform_int_distribution dist {0, vec.size() - 1}; + std::uniform_int_distribution dist {0, static_cast(vec.size()) - 1}; return vec[dist(instance()._reng)]; }