added static_cast to fix error

This commit is contained in:
Bob Polis 2021-11-11 17:51:29 +01:00
parent d607dab17c
commit 10a9ad9bbb

View File

@ -27,7 +27,7 @@ namespace sc {
template <typename T> template <typename T>
static T choice(const std::vector<T>& vec) { static T choice(const std::vector<T>& vec) {
std::uniform_int_distribution<int> dist {0, vec.size() - 1}; std::uniform_int_distribution<int> dist {0, static_cast<int>(vec.size()) - 1};
return vec[dist(instance()._reng)]; return vec[dist(instance()._reng)];
} }