From: Marco Costalba Date: Sun, 21 Jul 2013 09:01:24 +0000 (+0200) Subject: Small touches in move generation X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=c45c6d308fea4e21004675ff62d9386834372675;hp=f73bb438aa35d6eb6e7fade091e31e878a230465 Small touches in move generation No functional change. --- diff --git a/src/movegen.cpp b/src/movegen.cpp index a0c06aa8..76e171f8 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -346,10 +346,9 @@ ExtMove* generate(const Position& pos, ExtMove* mlist) { assert(pos.checkers()); - Square from, checksq; int checkersCnt = 0; Color us = pos.side_to_move(); - Square ksq = pos.king_square(us); + Square ksq = pos.king_square(us), from = ksq /* For SERIALIZE */, checksq; Bitboard sliderAttacks = 0; Bitboard b = pos.checkers(); @@ -388,14 +387,13 @@ ExtMove* generate(const Position& pos, ExtMove* mlist) { // Generate evasions for king, capture and non capture moves b = pos.attacks_from(ksq) & ~pos.pieces(us) & ~sliderAttacks; - from = ksq; SERIALIZE(b); if (checkersCnt > 1) return mlist; // Double check, only a king move can save the day // Generate blocking evasions or captures of the checking piece - Bitboard target = between_bb(checksq, ksq) | pos.checkers(); + Bitboard target = between_bb(checksq, ksq) | checksq; return generate_all(pos, mlist, us, target); }