Replace clear_bit() with xor_bit()

This allows to retire ClearMaskBB[] and use just
one SquareBB[] array to set and clear a bit.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2012-01-29 09:11:03 +01:00
parent b76c04c097
commit 875a8079bc
8 changed files with 49 additions and 61 deletions

View File

@@ -98,7 +98,7 @@ const string move_to_san(Position& pos, Move m) {
// Disambiguation if we have more then one piece with destination 'to'
// note that for pawns is not needed because starting file is explicit.
attackers = pos.attackers_to(to) & pos.pieces(pt, pos.side_to_move());
clear_bit(&attackers, from);
xor_bit(&attackers, from);
ambiguousMove = ambiguousFile = ambiguousRank = false;
while (attackers)