1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

Fix a couple of gcc warnings in position.cpp

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2008-11-01 12:52:40 +01:00
parent 35bd334b30
commit b5232e2da3

View file

@ -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 WR: case BR: return piece_attacks_square<ROOK>(f, t);
case WQ: case BQ: return piece_attacks_square<QUEEN>(f, t); case WQ: case BQ: return piece_attacks_square<QUEEN>(f, t);
case WK: case BK: return piece_attacks_square<KING>(f, t); case WK: case BK: return piece_attacks_square<KING>(f, t);
default: break;
} }
return false; 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 WR: case BR: return piece_attacks_square<ROOK>(t, s);
case WQ: case BQ: return piece_attacks_square<QUEEN>(t, s); case WQ: case BQ: return piece_attacks_square<QUEEN>(t, s);
case WK: case BK: return piece_attacks_square<KING>(t, s); case WK: case BK: return piece_attacks_square<KING>(t, s);
default: break;
} }
return false; 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 bit_is_set(rook_attacks_bb(rto, b), ksq);
} }
return false; return false;
default: // NO_PIECE_TYPE
break;
} }
assert(false); assert(false);
return false; return false;
@ -1113,7 +1118,7 @@ void Position::do_promotion_move(Move m, UndoInfo &u) {
castleRights &= castleRightsMask[to]; castleRights &= castleRightsMask[to];
key ^= zobCastle[castleRights]; key ^= zobCastle[castleRights];
// Reset rule 50 counter // Reset rule 50 counter
rule50 = 0; rule50 = 0;
// Update checkers BB // Update checkers BB