From d63ff85a43667f8e0de7b7e163cba02193a70815 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sun, 24 May 2009 10:25:59 +0100 Subject: [PATCH 1/1] Add a bit more pop_1st_bit conversions No functional change. Signed-off-by: Marco Costalba --- src/movegen.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/movegen.cpp b/src/movegen.cpp index a76d9f7c..8a03acd6 100644 --- a/src/movegen.cpp +++ b/src/movegen.cpp @@ -262,14 +262,14 @@ int generate_evasions(const Position& pos, MoveStack* mlist, Bitboard pinned) { Bitboard b = checkers & (pos.queens() | pos.bishops()); while (b) { - from = pop_1st_bit(&b); + from = pop_1st_bit(&b); checkersAttacks |= bishop_attacks_bb(from, b_noKing); } b = checkers & (pos.queens() | pos.rooks()); while (b) { - from = pop_1st_bit(&b); + from = pop_1st_bit(&b); checkersAttacks |= rook_attacks_bb(from, b_noKing); } @@ -277,7 +277,7 @@ int generate_evasions(const Position& pos, MoveStack* mlist, Bitboard pinned) { Bitboard b1 = pos.piece_attacks(ksq) & ~pos.pieces_of_color(us) & ~checkersAttacks; while (b1) { - to = pop_1st_bit(&b1); + to = pop_1st_bit(&b1); // Note that we can use square_is_attacked() only because we // have already removed slider checkers. if (!pos.square_is_attacked(to, them)) @@ -299,7 +299,7 @@ int generate_evasions(const Position& pos, MoveStack* mlist, Bitboard pinned) { b1 = pos.pawn_attacks(them, checksq) & pos.pawns(us) & ~pinned; while (b1) { - from = pop_1st_bit(&b1); + from = pop_1st_bit(&b1); if (relative_rank(us, checksq) == RANK_8) { (*mlist++).move = make_promotion_move(from, checksq, QUEEN); @@ -317,7 +317,7 @@ int generate_evasions(const Position& pos, MoveStack* mlist, Bitboard pinned) { while (b1) { - from = pop_1st_bit(&b1); + from = pop_1st_bit(&b1); (*mlist++).move = make_move(from, checksq); } @@ -357,7 +357,7 @@ int generate_evasions(const Position& pos, MoveStack* mlist, Bitboard pinned) { b1 &= ~pinned; while (b1) { - from = pop_1st_bit(&b1); + from = pop_1st_bit(&b1); // Move is always legal because checking pawn is not a discovered // check candidate and our capturing pawn has been already tested // against pinned pieces. @@ -850,7 +850,7 @@ namespace { Bitboard b = target & dc; while (b) { - Square from = pop_1st_bit(&b); + Square from = pop_1st_bit(&b); Bitboard bb = pos.piece_attacks(from) & pos.empty_squares(); if (Piece == KING) bb &= ~QueenPseudoAttacks[ksq]; @@ -868,7 +868,7 @@ namespace { while (b) { - Square from = pop_1st_bit(&b); + Square from = pop_1st_bit(&b); if ( (Piece == QUEEN && !(QueenPseudoAttacks[from] & checkSqs)) || (Piece == ROOK && !(RookPseudoAttacks[from] & checkSqs)) || (Piece == BISHOP && !(BishopPseudoAttacks[from] & checkSqs))) -- 2.39.2