mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 09:37:16 +08:00
Code clean-up
This patch implements some idea by Alain Savard and Mike Whiteley taken from the perpertual renaming/reformatting thread. This is a pure code cleaning patch (so no change in functionality), but I use it as a pretext to correct the bogus bench number that I introduced in the previous commit. Bench: 4413383
This commit is contained in:
@@ -551,7 +551,6 @@ namespace {
|
||||
score += ThreatByRank * (int)relative_rank(Them, s);
|
||||
}
|
||||
|
||||
// Bonus for king attacks on pawns or pieces which are not pawn-defended
|
||||
if (weak & attackedBy[Us][KING])
|
||||
score += ThreatByKing;
|
||||
|
||||
@@ -576,7 +575,7 @@ namespace {
|
||||
b = shift<Up>(pos.pieces(Us, PAWN)) & ~pos.pieces();
|
||||
b |= shift<Up>(b & TRank3BB) & ~pos.pieces();
|
||||
|
||||
// Keep only the squares which are not completely unsafe
|
||||
// Keep only the squares which are relatively safe
|
||||
b &= ~attackedBy[Them][PAWN]
|
||||
& (attackedBy[Us][ALL_PIECES] | ~attackedBy[Them][ALL_PIECES]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user