mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-23 05:07:14 +00:00
Reuse computed ray bitboard in update_piece_threats
Reuse the already-computed ray instead of calling ray_pass_bb a second time with identical arguments. closes https://github.com/official-stockfish/Stockfish/pull/6899 No functional change
This commit is contained in:
+1
-1
@@ -1218,7 +1218,7 @@ void Position::update_piece_threats(Piece pc,
|
||||
const Bitboard discovered = ray & (rAttacks | bAttacks) & occupiedNoK;
|
||||
|
||||
assert(!more_than_one(discovered));
|
||||
if (discovered && (ray_pass_bb(sliderSq, s) & noRaysContaining) != noRaysContaining)
|
||||
if (discovered && (ray & noRaysContaining) != noRaysContaining)
|
||||
{
|
||||
const Square threatenedSq = lsb(discovered);
|
||||
const Piece threatenedPc = piece_on(threatenedSq);
|
||||
|
||||
Reference in New Issue
Block a user