mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-06 10:53:50 +08:00
Fix a couple of gcc warnings in position.cpp
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -410,6 +410,7 @@ bool Position::piece_attacks_square(Square f, Square t) const {
|
||||
case WR: case BR: return piece_attacks_square<ROOK>(f, t);
|
||||
case WQ: case BQ: return piece_attacks_square<QUEEN>(f, t);
|
||||
case WK: case BK: return piece_attacks_square<KING>(f, t);
|
||||
default: break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -437,6 +438,7 @@ bool Position::move_attacks_square(Move m, Square s) const {
|
||||
case WR: case BR: return piece_attacks_square<ROOK>(t, s);
|
||||
case WQ: case BQ: return piece_attacks_square<QUEEN>(t, s);
|
||||
case WK: case BK: return piece_attacks_square<KING>(t, s);
|
||||
default: break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -643,6 +645,9 @@ bool Position::move_is_check(Move m, Bitboard dcCandidates) const {
|
||||
return bit_is_set(rook_attacks_bb(rto, b), ksq);
|
||||
}
|
||||
return false;
|
||||
|
||||
default: // NO_PIECE_TYPE
|
||||
break;
|
||||
}
|
||||
assert(false);
|
||||
return false;
|
||||
@@ -1113,7 +1118,7 @@ void Position::do_promotion_move(Move m, UndoInfo &u) {
|
||||
castleRights &= castleRightsMask[to];
|
||||
key ^= zobCastle[castleRights];
|
||||
|
||||
// Reset rule 50 counter
|
||||
// Reset rule 50 counter
|
||||
rule50 = 0;
|
||||
|
||||
// Update checkers BB
|
||||
|
||||
Reference in New Issue
Block a user