In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:33:17: error: implicit conversion loses integer precision: 'std::size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
int h = std::hash<int>()(state.player_x);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/sokoban.hpp:93:22: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
if (grid[y][x] == 'S') {
~~~~ ^
/in/sokoban.hpp:93:25: error: implicit conversion changes signedness: 'int' to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
if (grid[y][x] == 'S') {
~~~~ ^
/in/sokoban.hpp:96:22: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
grid[y][x] = '.'; // Convert start point to walkable path
~~~~ ^
/in/sokoban.hpp:96:25: error: implicit conversion changes signedness: 'int' to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
grid[y][x] = '.'; // Convert start point to walkable path
~~~~ ^
/in/sokoban.hpp:97:29: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
} else if (grid[y][x] == 'B') {
~~~~ ^
/in/sokoban.hpp:97:32: error: implicit conversion changes signedness: 'int' to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
} else if (grid[y][x] == 'B') {
~~~~ ^
/in/sokoban.hpp:99:22: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
grid[y][x] = '.'; // Convert box to walkable path
~~~~ ^
/in/sokoban.hpp:99:25: error: implicit conversion changes signedness: 'int' to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
grid[y][x] = '.'; // Convert box to walkable path
~~~~ ^
/in/sokoban.hpp:100:29: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
} else if (grid[y][x] == 'T') {
~~~~ ^
/in/sokoban.hpp:100:32: error: implicit conversion changes signedness: 'int' to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
} else if (grid[y][x] == 'T') {
~~~~ ^
/in/sokoban.hpp:134:85: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
if (!is_within_bounds(new_px, new_py, rows, cols) || !is_walkable(grid, new_px, new_py)) {
~~~~~~~~~~~ ^~~~~~
/in/sokoban.hpp:146:89: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
if (!is_within_bounds(new_bx, new_by, rows, cols) || !is_walkable(grid, new_bx, new_by)) {
~~~~~~~~~~~ ^~~~~~
/in/sokoban.hpp:84:21: error: implicit conversion loses integer precision: 'std::vector::size_type' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
int rows = grid.size();
~~~~ ~~~~~^~~~~~
/in/sokoban.hpp:85:24: error: implicit conversion loses integer precision: 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
int cols = grid[0].size();
~~~~ ~~~~~~~~^~~~~~
/in/sokoban.hpp:190:20: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
return answers[(int)index];
~~~~~~~ ^~~~~~~~~~
16 errors generated.
/in/Compile/Makefile:16: recipe for target 'main' failed
make: *** [main] Error 1