diff options
author | HampusM <hampus@hampusmat.com> | 2022-02-13 18:12:47 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-02-13 18:12:47 +0100 |
commit | 2b7f79b42c75fc3f35dff8503bb47ea15f0af029 (patch) | |
tree | 4171abd58ece6ea452a2cf116ae3a4884294261e /src/maze.tpp | |
parent | 2fbe2c72979e1470c85b8ff631e42e0594bd523c (diff) |
refactor: fix conversion warning
Diffstat (limited to 'src/maze.tpp')
-rw-r--r-- | src/maze.tpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/maze.tpp b/src/maze.tpp index 84c273e..fd71479 100644 --- a/src/maze.tpp +++ b/src/maze.tpp @@ -111,10 +111,8 @@ void matrix_to_maze(Matrix<Element> *matrix, std::shared_ptr<Vector2> start_pos, visited_pos_cnt++; - auto random_dist = std::uniform_int_distribution<unsigned short>( - 0U, - static_cast<unsigned short>(neighbours.size()) - 1U - ); + auto random_dist = std::uniform_int_distribution<unsigned int>( + 0U, static_cast<unsigned int>(neighbours.size()) - 1U); auto next_pos = neighbours[random_dist(random_gen)]; |