mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 01:27:16 +08:00
rename shift variables.
Where variable names are explicitly incorrect, I feel morally obligated to at least suggest an alternative. There are many, but these two are especially egregious. No functional change.
This commit is contained in:
committed by
Stéphane Nicolet
parent
6c898a10be
commit
820c5c25b6
@@ -512,8 +512,6 @@ namespace {
|
||||
|
||||
const Color Them = (Us == WHITE ? BLACK : WHITE);
|
||||
const Direction Up = (Us == WHITE ? NORTH : SOUTH);
|
||||
const Direction Left = (Us == WHITE ? NORTH_WEST : SOUTH_EAST);
|
||||
const Direction Right = (Us == WHITE ? NORTH_EAST : SOUTH_WEST);
|
||||
const Bitboard TRank3BB = (Us == WHITE ? Rank3BB : Rank6BB);
|
||||
|
||||
Bitboard b, weak, defended, nonPawnEnemies, stronglyProtected, safeThreats;
|
||||
@@ -529,7 +527,7 @@ namespace {
|
||||
b = pos.pieces(Us, PAWN)
|
||||
& (~attackedBy[Them][ALL_PIECES] | attackedBy[Us][ALL_PIECES]);
|
||||
|
||||
safeThreats = (shift<Right>(b) | shift<Left>(b)) & weak;
|
||||
safeThreats = pos.pawn_attacks<Us>(b) & weak;
|
||||
score += ThreatBySafePawn * popcount(safeThreats);
|
||||
}
|
||||
|
||||
@@ -585,7 +583,7 @@ namespace {
|
||||
& (attackedBy[Us][ALL_PIECES] | ~attackedBy[Them][ALL_PIECES]);
|
||||
|
||||
// Bonus for safe pawn threats on the next move
|
||||
b = (shift<Left>(b) | shift<Right>(b))
|
||||
b = pos.pawn_attacks<Us>(b)
|
||||
& pos.pieces(Them)
|
||||
& ~attackedBy[Us][PAWN];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user