mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 19:49:14 +00:00
Simplify generate_castling (#1885)
Although this is a compile-time constant, we stick the castlingSide into a CastlingRight, then pull it out again. This seems unecessarily complex. No functional change.
This commit is contained in:
parent
b54bcfddaa
commit
59d32f8edd
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ namespace {
|
|||
ExtMove* generate_castling(const Position& pos, ExtMove* moveList) {
|
||||
|
||||
constexpr CastlingRight Cr = Us | Cs;
|
||||
constexpr bool KingSide = (Cr == WHITE_OO || Cr == BLACK_OO);
|
||||
constexpr bool KingSide = (Cs == KING_SIDE);
|
||||
|
||||
if (pos.castling_impeded(Cr) || !pos.can_castle(Cr))
|
||||
return moveList;
|
||||
|
|
Loading…
Add table
Reference in a new issue