mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
Wrap all access to LineBB and add assert
This is a non-functional code style change which provides a safe access handler for LineBB. Also includes an assert in debug mode to verify square correctness. closes https://github.com/official-stockfish/Stockfish/pull/2719 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
902309020a
commit
b0eb5a1ba3
@@ -276,7 +276,7 @@ namespace {
|
||||
: attacks_bb<Pt>(s, pos.pieces());
|
||||
|
||||
if (pos.blockers_for_king(Us) & s)
|
||||
b &= LineBB[pos.square<KING>(Us)][s];
|
||||
b &= line_bb(pos.square<KING>(Us), s);
|
||||
|
||||
attackedBy2[Us] |= attackedBy[Us][ALL_PIECES] & b;
|
||||
attackedBy[Us][Pt] |= b;
|
||||
|
||||
Reference in New Issue
Block a user