From 10a9ad9bbb09b7a0c3988ab8407ba66a8a629dea Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Thu, 11 Nov 2021 17:51:29 +0100 Subject: [PATCH] added static_cast to fix error --- src/random.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)]; }