Accessor for SquareBB #2067

This is a non-functional code style change.

If we add an accessor function for SquareBB we can consolidate all of the asserts. This is also a bit cleaner because all SquareBB accesses go through this method making future changes easier to manage.

STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 63406 W: 14084 L: 14045 D: 35277
http://tests.stockfishchess.org/tests/view/5c9ea6100ebc5925cfffc9af

No functional change.
This commit is contained in:
protonspring
2019-03-31 02:43:20 -06:00
committed by Marco Costalba
parent 7133598a98
commit 796d0ad70e
4 changed files with 11 additions and 25 deletions

View File

@@ -118,7 +118,7 @@ namespace {
&& popcount(phalanx) >= popcount(leverPush))
e->passedPawns[Us] |= s;
else if ( stoppers == SquareBB[s + Up]
else if ( stoppers == square_bb(s + Up)
&& relative_rank(Us, s) >= RANK_5)
{
b = shift<Up>(support) & ~theirPawns;