X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=772410a04b9e7c4c63a79e6c33f39bdf7566298e;hp=747781a3308f8e6ed6938c1b6bfbdf31af250c5f;hb=6e6c5b61036c066584dac8557868cd41129bd14d;hpb=04fd7efdfa69c7eff716192238989b6dcdcead00 diff --git a/src/pawns.cpp b/src/pawns.cpp index 747781a3..772410a0 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -92,7 +92,6 @@ namespace { Bitboard b; Square s; File f; - Rank r; bool passed, isolated, doubled, opposed, chain, backward, candidate; Score value = SCORE_ZERO; const Square* pl = pos.list(Us); @@ -113,13 +112,12 @@ namespace { assert(pos.piece_on(s) == make_piece(Us, PAWN)); f = file_of(s); - r = rank_of(s); // This file cannot be semi-open e->semiopenFiles[Us] &= ~(1 << f); // Our rank plus previous one. Used for chain detection - b = rank_bb(r) | rank_bb(Us == WHITE ? r - Rank(1) : r + Rank(1)); + b = rank_bb(s) | rank_bb(s - pawn_push(Us)); // Flag the pawn as passed, isolated, doubled or member of a pawn // chain (but not the backward one).