aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <adammegarules1@gmail.com>2026-08-16 10:17:53 +0200
committerAdam <adammegarules1@gmail.com>2026-08-16 10:17:53 +0200
commitb0ed5c409f822fa120ef2e2c830842204b0945c1 (patch)
treecdf8728a86f33c474e9cd9336de6ed476ef822fb
parent9702738db498cba05e7605afe1f48672f530e1a9 (diff)
Fixing compiler errors
-rw-r--r--src/board/board.cpp4
-rw-r--r--src/uci.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/board/board.cpp b/src/board/board.cpp
index 7538a9b..7fe2ff1 100644
--- a/src/board/board.cpp
+++ b/src/board/board.cpp
@@ -47,8 +47,8 @@ uint16_t CreateMove(uint8_t from, uint8_t to, PieceType promotion) {
if (secondPromotionFlag) {
move |= (1 << 0);
}
- move |= (from << 2);
- move |= (to << 8);
+ move |= static_cast<uint16_t>(from << 2);
+ move |= static_cast<uint16_t>(to << 8);
return move;
};
diff --git a/src/uci.cpp b/src/uci.cpp
index f435a06..ff8bc33 100644
--- a/src/uci.cpp
+++ b/src/uci.cpp
@@ -99,7 +99,7 @@ static void PrintBitboard(uint64_t bb, const std::string &name) {
}
static void DebugBitboards(const Game *g) {
- static constexpr const std::array<std::string, 7> pieceNames = {
+ static const std::array<std::string, 7> pieceNames = {
"None", "Pawn", "Knight", "Bishop", "Rook", "Queen", "King",
};
@@ -123,7 +123,7 @@ static void DebugBitboards(const Game *g) {
pieceNames[static_cast<size_t>(type)]);
}
}
-}
+};
static void printPromotionLetter(PieceType p) {
if (p == NONEPIECE) {
return;