Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:112:61: error: implicit conversion loses integer precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Werror,-Wconversion]
    return abs(static_cast<int>(x1) - static_cast<int>(x1)) + abs(static_cast<int>(y1) - static_cast<int>(y2));
    ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/sokoban.hpp:110:14: error: unused variable 'x2' [-Werror,-Wunused-variable]
    uint16_t x2 = pos2 / mapColumns;
             ^
2 errors generated.
/in/Compile/Makefile:16: recipe for target 'main' failed
make: *** [main] Error 1

Information

Submit By
Type
Submission
Homework
Project3
Language
C++
Submit At
2024-11-26 00:26:29
Judged At
2024-11-26 00:26:29
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes