Assorted trivial cleanups 3/2019 (#2030)

No functional change.
This commit is contained in:
Marco Costalba
2019-03-31 11:47:36 +02:00
committed by GitHub
parent 95ba7f78d5
commit 82ad9ce9cf
9 changed files with 34 additions and 39 deletions

View File

@@ -628,7 +628,7 @@ bool Position::pseudo_legal(const Move m) const {
{
// We have already handled promotion moves, so destination
// cannot be on the 8th/1st rank.
if (rank_of(to) == relative_rank(us, RANK_8))
if ((Rank8BB | Rank1BB) & to)
return false;
if ( !(attacks_from<PAWN>(from, us) & pieces(~us) & to) // Not a capture