aboutsummaryrefslogtreecommitdiff
path: root/src/maze.tpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-01-24 22:33:31 +0100
committerHampusM <hampus@hampusmat.com>2022-01-24 22:33:31 +0100
commit9f685c302a52f0801ca2f03fc03db3cae61ad3e9 (patch)
treebe8fa4549a887afb7ac914944bed630cca397b2c /src/maze.tpp
parentb8d9da4884a74008e0c70bc8d907df618fc6d998 (diff)
refactor: fix compiler warnings
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)];