summaryrefslogtreecommitdiff
path: root/Userland/Games/Chess
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-05-02 00:00:52 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-03 08:42:39 +0200
commitb613817bcaada76f75289129e4987eafdaff6d87 (patch)
tree51978a2c44f29e0b730773e83d3eb368dd4a597e /Userland/Games/Chess
parentfdbe66a7b4b3fec0beba0eac8b78bf29841a5e9c (diff)
downloadserenity-b613817bcaada76f75289129e4987eafdaff6d87.zip
Userland: Fix 64-bit portability issues
Diffstat (limited to 'Userland/Games/Chess')
-rw-r--r--Userland/Games/Chess/ChessWidget.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Games/Chess/ChessWidget.cpp b/Userland/Games/Chess/ChessWidget.cpp
index 79572d42f9..b723ffbd95 100644
--- a/Userland/Games/Chess/ChessWidget.cpp
+++ b/Userland/Games/Chess/ChessWidget.cpp
@@ -360,13 +360,13 @@ void ChessWidget::set_piece_set(const StringView& set)
Chess::Square ChessWidget::mouse_to_square(GUI::MouseEvent& event) const
{
- size_t tile_width = width() / 8;
- size_t tile_height = height() / 8;
+ unsigned tile_width = width() / 8;
+ unsigned tile_height = height() / 8;
if (side() == Chess::Color::White) {
- return { 7 - (event.y() / tile_height), event.x() / tile_width };
+ return { (unsigned)(7 - (event.y() / tile_height)), (unsigned)(event.x() / tile_width) };
} else {
- return { event.y() / tile_height, 7 - (event.x() / tile_width) };
+ return { (unsigned)(event.y() / tile_height), (unsigned)(7 - (event.x() / tile_width)) };
}
}