aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/left_panel/board/BoardCanvas.hpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-05-10 10:49:31 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2023-05-10 10:49:31 +0200
commita9b9ed95f39cff40710e74ed81fdedee1cfad9e2 (patch)
treeacd01294ad1ae6f88b7515d6a6d8ac790f444f1d /src/game_tab/left_panel/board/BoardCanvas.hpp
parentff671f2171396088210600bab39ad9631e0d1daf (diff)
Remove all warnings from source code
Diffstat (limited to 'src/game_tab/left_panel/board/BoardCanvas.hpp')
-rw-r--r--src/game_tab/left_panel/board/BoardCanvas.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game_tab/left_panel/board/BoardCanvas.hpp b/src/game_tab/left_panel/board/BoardCanvas.hpp
index e7f28dd..cd8ace9 100644
--- a/src/game_tab/left_panel/board/BoardCanvas.hpp
+++ b/src/game_tab/left_panel/board/BoardCanvas.hpp
@@ -27,7 +27,7 @@ wxDECLARE_EVENT(PLAY_MOVE_EVENT, wxCommandEvent);
file = 7 - file; \
rank = 7 - rank; \
} \
- bool IsCurrentSquareValid = file >= 0 && file <= 7 && rank >= 0 && rank <= 7;
+ bool IsCurrentSquareValid = file <= 7 && rank <= 7; // Do not need to check rank>=0 and file>=0 since unsigned int
#define MOUSE_ON(x, y, width, height) \
(mouseX >= (x) && mouseX <= ((x) + (width)) && mouseY >= (y) && \
@@ -100,7 +100,7 @@ class BoardCanvas : public wxPanel {
// Various canvas state variables
bool black_side, is_dragging, valid_drag, arrow_drag, is_black_turn;
- std::uint32_t boardX, boardY, square_width, piece_width, mouseX, mouseY, lastClickX,
+ std::int32_t boardX, boardY, square_width, piece_width, mouseX, mouseY, lastClickX,
lastClickY;
wxSize canvas_size;
wxPoint active_square;