aboutsummaryrefslogtreecommitdiff
path: root/src/maze.tpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/maze.tpp')
-rw-r--r--src/maze.tpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/maze.tpp b/src/maze.tpp
index 6c4fd71..84c273e 100644
--- a/src/maze.tpp
+++ b/src/maze.tpp
@@ -111,8 +111,10 @@ void matrix_to_maze(Matrix<Element> *matrix, std::shared_ptr<Vector2> start_pos,
visited_pos_cnt++;
- auto random_dist =
- std::uniform_int_distribution<unsigned int>(0U, neighbours.size() - 1UL);
+ auto random_dist = std::uniform_int_distribution<unsigned short>(
+ 0U,
+ static_cast<unsigned short>(neighbours.size()) - 1U
+ );
auto next_pos = neighbours[random_dist(random_gen)];