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:
parent
35bd334b30
commit
b5232e2da3
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue