X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitboard.h;h=d846765b26b69d776ed189abc0744e4f51067662;hp=6e37395241ad538a3a256f123f4a508af2755e8a;hb=141410f177c2514493f40d21a426490047cf97de;hpb=45acec1865f19297d91c6aff0ba64b990ad7d242 diff --git a/src/bitboard.h b/src/bitboard.h index 6e373952..d846765b 100644 --- a/src/bitboard.h +++ b/src/bitboard.h @@ -50,7 +50,6 @@ extern const Bitboard FileBB[8]; extern const Bitboard NeighboringFilesBB[8]; extern const Bitboard ThisAndNeighboringFilesBB[8]; extern const Bitboard RankBB[8]; -extern const Bitboard RelativeRankBB[2][8]; extern const Bitboard InFrontBB[2][8]; extern Bitboard SetMaskBB[65]; @@ -154,17 +153,6 @@ inline Bitboard this_and_neighboring_files_bb(Square s) { } -/// relative_rank_bb() takes a color and a rank as input, and returns a bitboard -/// representing all squares on the given rank from the given color's point of -/// view. For instance, relative_rank_bb(WHITE, 7) gives all squares on the -/// 7th rank, while relative_rank_bb(BLACK, 7) gives all squares on the 2nd -/// rank. - -inline Bitboard relative_rank_bb(Color c, Rank r) { - return RelativeRankBB[c][r]; -} - - /// in_front_bb() takes a color and a rank or square as input, and returns a /// bitboard representing all the squares on all ranks in front of the rank /// (or square), from the given color's point of view. For instance, @@ -202,17 +190,13 @@ inline Bitboard bishop_attacks_bb(Square s, Bitboard blockers) { inline Bitboard rook_attacks_bb(Square s, Bitboard blockers) { Bitboard b = blockers & RMask[s]; return RAttacks[RAttackIndex[s] + - (unsigned(int(b) * int(RMult[s]) ^ - int(b >> 32) * int(RMult[s] >> 32)) - >> RShift[s])]; + (unsigned(int(b) * int(RMult[s]) ^ int(b >> 32) * int(RMult[s] >> 32)) >> RShift[s])]; } inline Bitboard bishop_attacks_bb(Square s, Bitboard blockers) { Bitboard b = blockers & BMask[s]; return BAttacks[BAttackIndex[s] + - (unsigned(int(b) * int(BMult[s]) ^ - int(b >> 32) * int(BMult[s] >> 32)) - >> BShift[s])]; + (unsigned(int(b) * int(BMult[s]) ^ int(b >> 32) * int(BMult[s] >> 32)) >> BShift[s])]; } #endif