Retire queen_attacks_bb()
authorMarco Costalba <mcostalba@gmail.com>
Sat, 14 Jan 2012 22:00:10 +0000 (23:00 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 14 Jan 2012 22:00:10 +0000 (23:00 +0100)
No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/bitboard.cpp
src/bitboard.h

index 138d8c7..c56d8e9 100644 (file)
@@ -227,7 +227,7 @@ void bitboards_init() {
   {
       PseudoAttacks[BISHOP][s] = bishop_attacks_bb(s, 0);
       PseudoAttacks[ROOK][s]   = rook_attacks_bb(s, 0);
-      PseudoAttacks[QUEEN][s]  = queen_attacks_bb(s, 0);
+      PseudoAttacks[QUEEN][s]  = PseudoAttacks[BISHOP][s] | PseudoAttacks[ROOK][s];
   }
 
   for (Square s1 = SQ_A1; s1 <= SQ_H8; s1++)
index a00a0bd..3b82e2d 100644 (file)
@@ -169,10 +169,6 @@ inline Bitboard bishop_attacks_bb(Square s, Bitboard occ) {
   return BAttacks[s][bishop_index(s, occ)];
 }
 
-inline Bitboard queen_attacks_bb(Square s, Bitboard blockers) {
-  return rook_attacks_bb(s, blockers) | bishop_attacks_bb(s, blockers);
-}
-
 
 /// squares_between returns a bitboard representing all squares between
 /// two squares.  For instance, squares_between(SQ_C4, SQ_F7) returns a